on_off
Last updated on August 20, 2024
Data type: BOOL.
Usage method: stores the device state and can change it.
Purpose: manages the device state:
true
– the device is on. E.g. the light is on.false
– the device is off. E.g. the light was turned off via the Salute app.
Devices with this function
- kettle – kettles.
- led_strip – LED strips.
- light – lamps, night lights, etc.
- socket – sockets, extension cables, etc.
- relay – relay.
- hvac_ac – air conditioners.
- hvac_air_purifier – air purifiers.
- hvac_fan – fans.
- hvac_heater – heaters.
- hvac_radiator – thermostats.
- hvac_underfloor_heating – heated floors.
Examples of voice commands
— Салют, включи лампу (Salute, turn on the lamp)
— Салют, выключи розетку (Salute, turn off the socket)
Function description for a device model
The function must be added to the model descriptions of all devices that support it.
"features": [
"on_off",
// ...
]
Function state description example
The example describes a switched-off device.
{
"states": [
{
"key": "on_off",
"value": {
"type": "BOOL",
"bool_value": false
}
}
]
}