architecture
architecture copied to clipboard
Adding question binary device class
Context
There are cases where home assistant answers a question via a sensor. Will it rain today? Is today trash day? Did grandma get her pill? Is the light on?
Currently this can be done with a binary sensor that shows true/false or a template sensor that shows any text you want with an if else statement.
Proposal
I am proposing adding a device class for a binary sensor called question where true equals yes and false equals no. So that In the front end the question being asked is answered in the proper format rather than requiring interpretation or a template sensor to do a binary sensors job.
Should I wash my car: true Vs. Should I was my car: yes
Consequences
Additional lines of code for something you can accomplish currently with a template sensor but would make an easier with less lines of yaml for the user.
Device classes describe the state, not what measures/causes the state.