mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-21 10:57:43 +00:00
24 lines
682 B
YAML
24 lines
682 B
YAML
group:
|
|
all_doors:
|
|
name: All doors
|
|
entities:
|
|
- binary_sensor.front_door_contact
|
|
- binary_sensor.bedroom_door_contact
|
|
- binary_sensor.kitchen_door
|
|
|
|
sensor:
|
|
- platform: template
|
|
sensors:
|
|
open_door_count:
|
|
friendly_name: Open door count
|
|
value_template: >-
|
|
{% set entityStates = states | selectattr('entity_id', 'in', state_attr('group.all_doors', 'entity_id')) %}
|
|
{{ entityStates | selectattr('state', 'eq', 'on') | list | count | int }}
|
|
|
|
homeassistant:
|
|
customize:
|
|
binary_sensor.front_door_contact:
|
|
friendly_name: Front door
|
|
binary_sensor.kitchen_door_contact:
|
|
friendly_name: Kitchen door
|