Skip to content

Commit

Permalink
✨ (templ): Add lights on amount template
Browse files Browse the repository at this point in the history
  • Loading branch information
thibmaek committed Oct 18, 2023
1 parent 52d1987 commit 50e85b4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions custom_templates/light.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@
| list
}}
{% endmacro %}

{% macro lights_on_in_area(area) %}
{{
area_entities(area)
| select('match', 'light.')
| select('is_state', 'on')
| list
| count
}}
{% endmacro %}

0 comments on commit 50e85b4

Please sign in to comment.