I think automation, scripts, and templates could be more flexible and useful if they could support/select entities based on their capability.
For example, there are several different entity types that have an ‘on’ and ‘off’ state. In an entity selector in yaml, it should be easy to select entities that have that trait, and treat them the same. Similarly for devices the have a ‘turn_on’ and ‘turn_off’ service. ,
When trying to combine the states of several objects, we can ask for the state ‘has_state.turn_on’ instead of ‘binary_sensor.turn_on’.
instead of ‘binary_sensor.turn_on’ service we call has_onoff_trait.turn_on.
The helpers that ship with home assistant should support these traits. The use of these should be in examples for helpers, blueprints, etc. The blueprint tutorial could use this to select the input.