Hi all!
Started out with Home Assistant recently and I got an expected behaviour which I don’t know how to create.
So currently I use the custom ‘slider-entity-row’ card for a brightness slider for all the lights in the living room:
Except, when moving the slider, it also turns on lights which were initially off. And I would like the slider to just change the brightness (or color temp) of the lights which are currently on / active.
Tried many different options, but couldn’t solve it yet, But I have a feeling that this is definitely possible.
Tried implementing if statement into the ‘entity:’ property.
{%- set entities = [states.light.ikea_lamp, states.light.tv_lamp, states.light.plafondlamp_groep, states.light.tafellamp_groep ] -%}
{%- for entity in entities -%}
{%- if entity.state == 'on' %}
{{ entity.entity_id }}
{%- endif %}
{%- endfor -%}
But that isn’t allowed?
Then I also tried creating a sensor from it, which returns the entity_id’s of the on / active lights. But also couldn’t use the sensor within the ‘entity:’ property.
So many hours later, I gave up and wondered if any of you knew how to solve this.