Flatten light groups

This commit is contained in:
Georgi Gardev
2022-12-01 16:02:00 +02:00
parent 2f5b6addef
commit 2577bd0e27
10 changed files with 124 additions and 140 deletions
-11
View File
@@ -1,11 +0,0 @@
>-
{%- if is_state('light.all', 'on') -%}
There are
{%- for state in states.light if state.state == 'on' -%}
{% if loop.last %} {{ loop.index }} {% endif %}
{%- endfor -%}
lights turned on right now.
{%- else -%}
There are no lights turned on right now.
{%- endif -%}