This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template: | |
- sensor: | |
- name: Total entities | |
icon: mdi:shape | |
state: "{{ states | count }}" | |
- name: Total automations | |
icon: mdi:robot | |
state: "{{ states.automation | count }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template: | |
- sensor: | |
- name: Lights on | |
icon: mdi:lightbulb | |
state: >- | |
{% set exclude_areas = [None, 'Volvo'] %} | |
{{ states.light | selectattr('state', 'eq', 'on') | map(attribute='entity_id') | map('area_name') | reject('in', exclude_areas) | list | count }} | |
attributes: | |
areas: >- | |
{% set exclude_areas = [None, 'Volvo'] %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template: | |
- binary_sensor: | |
- name: Open windows | |
icon: mdi:window-open-variant | |
state: >- | |
{{ states.binary_sensor | selectattr('attributes.device_class', 'eq', 'door') | selectattr('state', 'eq', 'on') | map(attribute='entity_id') | map('area_name') | list | count > 0 }} | |
attributes: | |
areas: >- | |
{{ states.binary_sensor | selectattr('attributes.device_class', 'eq', 'door') | selectattr('state', 'eq', 'on') | map(attribute='entity_id') | map('area_name') | unique | list }} |