Is there a simple way of returning the device class state of an entity rather than the state
so states.sensor_door.state returns off or on rather than open and closed
states.sensor_temp_with_unit returns the state with the uom
There must be a lookup somewhere in HA as Lovelace can display the correct device class state ?
I want to use this to send message to Alexa and Im forced to use a template to change on and off for open and closed. or whatever the device class is
Is there a simpler way ?