ym88659208ym87991671
Device sensor_water_leak | Documentation for developers

sensor_water_leak

Last updated on May 25, 2023

Leak sensor.

Available device functions

The device can have all the functions listed below or some of them. E.g. if the sensor cannot report the battery charge level, there is no need in including the battery_percentage function in its model description.

Some functions are mandatory, and all leak sensors must have them.

FunctionMandatory?Description
battery_low_powerBattery low or not
battery_percentageBatter charge level
online✔︎Device availability: offline or online
signal_strengthSignal strength
water_leak_state✔︎Whether a water leak detected

Leak sensor model description example

The model shall be described in accordance with the model structure. The example describes a sensor that can report the detection of a leak, signal strength, battery charge level and whether the battery is low.

In addition, the model's allowed values for the signal_strength function have been changed: it supports only two levels of signal strength. The medium level is not supported and has been deleted.

{
"id": "QWERTY124",
"manufacturer": "Xiaqara",
"model": "SM1123456789",
"hw_version": "3.1",
"sw_version": "5.6",
"description": "Xiaqara smart leak sensor",
"category": "sensor_water_leak",
"features": [
"online",
"battery_low_power",
"battery_percentage",
"signal_strength",
"water_leak_state",
],
"allowed_values": {
"signal_strength": {
"type": "ENUM",
"enum_values": {
"values": [
"low",
"high",
]
}
}
}
}

User's leak sensor description example

The device shall be describe in accordance with the device structure. The example contains no sensor model description as we believe that models are described independently and the model ID will be enough (in this case, QWERTY124).

For the sensor, parent_id is indicated – a hub ID through which the sensor is connected to the Smart Home.

{
"id": "ABCD_004",
"parent_id": "A_002",
"name": "My leak sensor",
"default_name": "Smart leak sensor",
"nicknames": ["Water sensor", "Flood sensor"],
"home": "My home",
"room": "Bathroom",
"model_id": "QWERTY124",
"hw_version": "3.1",
"sw_version": "5.6",
"partner_meta": {
"internal-id": 1234,
"specificity": "microchip 2A"
},
}
Sber process cookies only to personalize services according to Cookies Usage Policy. You can prevent the processing of cookies in your browser settings.