- condition: template
value_template: >
{% if entity_domain == "scene" %}
true
{% elif states[target_entity].state == 'off' %}
true
{% else %}
false
{% endif %}
can be reduced to this:
- condition: template
value_template: >
{{ entity_domain == 'scene' or states[target_entity].state == 'off' }}
https://community.home-assistant.io/t/turn-on-light-switch-scene-script-or-group-based-on-motion-illuminance-sun-more-conditions/257085/5?u=msly
0