Hey!
I’m wondering how to get every single light that’s on in Home Assistant to list in an entity, so for example:
Lamp, Kitchen Light
I’m looking to add this to a dashboard to show what’s been left on.
Hey!
I’m wondering how to get every single light that’s on in Home Assistant to list in an entity, so for example:
Lamp, Kitchen Light
I’m looking to add this to a dashboard to show what’s been left on.
Do you really want an entity, or just a way to display the information?
If you really want an entity, you can use the following in a Template sensor:
{{states.light|selectattr('state', 'eq', 'on')
|map(attribute='name')|join(', ') }}
Otherwise, there are a few cards that can show entities conditionally:
Entity Filter card
Auto-Entities Card
Markdown Card (use the template above in the content
section.)