feature-requests
                                
                                 feature-requests copied to clipboard
                                
                                    feature-requests copied to clipboard
                            
                            
                            
                        Support enum sensors
Describe the problem you have/What new integration you would like
Please add support for device_class: enum, and "options:" to text_sensor.
Please describe your use case for this integration and alternatives you've tried:
There are devices (for example Sonicare, that can be conneced via BLE), that report state as one value of a given set. Running/Idle/Off/Charging for example. Currently, we have 2 ways to deal with this:
- Use text_sensor (which currently doesn't support enum/options). That is pain to use in HA automations, as HA doesn't know the possible states to offer you drop down list, so you have to write the expected value letter by letter. Easy to make a typo, hard to update for any changes. That's far from ideal.
- Or, use select.template . That works in HA automations, but... You have to set empty set_action, and in HA, device view, it offers you dropdown list to change the value. Again, not ideal.
What we need is read only value (as text_sensor is), with a way to tell HA what are the possible values (as select sensor has). That could be achieved by adding support for "device_class: enum" and "options:" to text_sensor. It would then expose "options:" attribute on the entity to HA.
Additional context