ym88659208ym87991671
Device sensor_gas | Documentation for developers

sensor_gas

Last updated on June 17, 2024

Gas 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 gas sensors must have them.

FunctionMandatory?Description
alarm_muteIs the sound alert turned off when the sensor is triggered
battery_low_powerBattery low or not
battery_percentageBatter charge level
gas_leak_state✔︎Whether a gas leak detected
online✔︎Device availability: offline or online
sensor_sensitiveSensor sensitivity
signal_strengthSignal strength

Gas sensor model description example

The model is described according to the model structure. The example describes a sensor that can report gas detection, signal strength, sound alert setting, battery level and whether the battery is low. Also supports changing the sensitivity level.

In addition, the model changed has available values for the signal_strength function (signal strength): this model supports only two levels of signal strength. The average medium level is not supported and is excluded.

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

User's gas 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 gas sensor",
"default_name": "Smart gas sensor",
"nicknames": ["Leak detector", "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"
},
}
Sber process cookies only to personalize services according to Cookies Usage Policy. You can prevent the processing of cookies in your browser settings.