sensor_water_leak
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.
Function | Mandatory? | Description |
battery_low_power | Battery low or not | |
battery_percentage | Batter charge level | |
online | ✔︎ | Device availability: offline or online |
signal_strength | Signal 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"
},
}