snicker / zwift_hass

Zwift Sensor Integration for HomeAssistant
52 stars 13 forks source link

Binary sensor should be on/off instead of True/False #32

Closed dc31xx closed 3 months ago

dc31xx commented 2 years ago

Although the docs state that true/false is an option:

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).

snicker commented 2 years ago

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.