mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-15 12:34:42 +00:00
Refactor climate config
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
group:
|
||||
all_windows:
|
||||
name: All windows
|
||||
entities:
|
||||
- binary_sensor.living_room_right_window
|
||||
- binary_sensor.bedroom_left_window
|
||||
- binary_sensor.bedroom_right_window
|
||||
- binary_sensor.kitchen_window
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
@@ -41,12 +50,19 @@ binary_sensor:
|
||||
{% else %} mdi:window-closed-variant
|
||||
{% endif %}
|
||||
|
||||
group:
|
||||
all_windows:
|
||||
name: All windows
|
||||
entities:
|
||||
- binary_sensor.living_room_right_window_on_off
|
||||
- binary_sensor.bedroom_right_window_on_off
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
open_window_count:
|
||||
entity_id:
|
||||
- binary_sensor.living_room_right_window
|
||||
- binary_sensor.bedroom_left_window
|
||||
- binary_sensor.bedroom_right_window
|
||||
- binary_sensor.kitchen_window
|
||||
friendly_name: Open window count
|
||||
value_template: >-
|
||||
{{ states | selectattr('entity_id', 'in', state_attr('group.all_windows', 'entity_id')) | selectattr('state', 'eq', 'on') | list | count | int }}
|
||||
|
||||
#
|
||||
# ─── CUSTOMIZATION ──────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user