sensor_smoke
Smoke 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 smoke sensors must have them.
Function | Mandatory? | Description |
alarm_mute | Is the sound alert turned off when the sensor is triggered | |
battery_low_power | Battery low or not | |
battery_percentage | Batter charge level | |
online | ✔︎ | Device availability: offline or online |
signal_strength | Signal strength | |
smoke_state | ✔︎ | Whether a smoke detected |
Smoke sensor model description example
The model is described according to the model structure. The example describes a sensor that can report smoke detection, signal strength, sound alert setting, battery level, and whether the battery is low.
In addition, the model changed has available values for the signal_strength
function (signal strength): this model only supports two signal strength levels. The average medium
level is not supported and has been removed.
{
"id": "QWERTY124",
"manufacturer": "Xiaqara",
"model": "SM1123456789",
"hw_version": "3.1",
"sw_version": "5.6",
"description": "Xiaqara smart smoke sensor",
"category": "sensor_smoke",
"features": [
"alarm_mute",
"battery_low_power",
"battery_percentage",
"online",
"signal_strength",
"smoke_state",
],
"allowed_values": {
"signal_strength": {
"type": "ENUM",
"enum_values": {
"values": [
"low",
"high",
]
}
}
}
}
User's smoke sensor description example
The device is described according to the device structure. There is no description of the sensor model in the example — we assume that the models are described separately, so it is enough to specify only the model ID (here — QWERTY124).
The sensor has parent_id
specified - the ID of the hub through which the sensor is connected to the smart home.
{
"id": "ABCD_004",
"parent_id": "A_002",
"name": "My smoke sensor",
"default_name": "Smart smoke sensor",
"nicknames": ["Fire sensor", "Alarm"],
"home": "My home",
"room": "Hallway",
"model_id": "QWERTY124",
"hw_version": "3.1",
"sw_version": "5.6",
"partner_meta": {
"internal-id": 1234,
"specificity": "microchip 2A"
},
}