Closed dc31xx closed 3 months ago
Although the docs state that true/false is an option:
true
false
For example, a binary sensor for a window may report a value of open or closed, a switch on or off, a condition true or false.
It is almost always on/off (check the occupancy device class for example). Also the casing is never capitalized (true/false instead of True/False).
on
off
True
False
Could you elaborate? in code, the state should always be represented as Boolean values for binary sensors when reporting the state. When displayed in the UI, it is based on the device class.
Although the docs state that
true
/false
is an option:It is almost always
on
/off
(check the occupancy device class for example). Also the casing is never capitalized (true
/false
instead ofTrue
/False
).