battery_percentage
Data type: INTEGER(0, 100).
Usage method: stores the device state without changing it.
Purpose: shows the battery charge level. It takes values from the range of 0-100% at an interval of 1%.
When describing the device model, the range and interval of values taken by the function can be changed.
Devices with this function
- scenario_button — scenario buttons.
- sensor_door — opening sensors.
- sensor_gas — gas sensors.
- sensor_pir — motion sensors.
- sensor_smoke — smoke sensors.
- sensor_temp — temperature and humidity sensors.
- sensor_water_leak — leak sensors.
- valve — motorized valves.
- window_blind — louvered blinds, roll blinds.
Examples of voice commands
— Салют, какой заряд батареи датчика движения в процентах? (Salute, what is the percentage of motion sensor's battery charge?)
— Салют, расскажи, какой заряд у батареи жалюзи? (Salute, tell me, what is the window blind's battery charge?)
— Салют, проверь заряд пылесоса (Salute, check the charge of the vacuum cleaner)
Function description for a device model
The function must be added to the model descriptions of all devices that support it.
"features": [
"battery_percentage",
// ...
]
Function state description example
The example describes a device with the battery charge level of 75%.
{
"states": [
{
"key": "battery_percentage",
"value": {
"type": "INTEGER",
"integer_value": "75"
}
}
]
}