Files
sarah/config/packages/modules/climate/windows.yaml
T

48 lines
1.7 KiB
YAML

binary_sensor:
- platform: template
sensors:
living_room_right_window_on_off_wrapper:
friendly_name: Living room window
device_class: window
value_template: "{{ is_state('binary_sensor.living_room_right_window_on_off', 'on') }}"
entity_id: binary_sensor.living_room_right_window_on_off
icon_template: >
{% if is_state('binary_sensor.living_room_right_window_on_off', 'on') %} mdi:window-open-variant
{% else %} mdi:window-closed-variant
{% endif %}
bedroom_right_window_on_off_wrapper:
friendly_name: Bedroom window
device_class: window
value_template: "{{ is_state('binary_sensor.bedroom_right_window_on_off', 'on') }}"
entity_id: binary_sensor.bedroom_right_window_on_off
icon_template: >
{% if is_state('binary_sensor.bedroom_right_window_on_off', 'on') %} mdi:window-open-variant
{% else %} mdi:window-closed-variant
{% endif %}
#
# ─── CUSTOMIZATION ──────────────────────────────────────────────────────────────
#
homeassistant:
customize:
binary_sensor.living_room_right_window_on_off:
friendly_name: Living room window sensor
sensor.living_room_right_window_power:
friendly_name: Living room window battery
binary_sensor.bedroom_right_window_on_off:
friendly_name: Bedroom window sensor
sensor.bedroom_right_window_power:
friendly_name: Bedroom window battery
group:
all_windows:
name: All windows
entities:
- binary_sensor.living_room_right_window_on_off
- binary_sensor.bedroom_right_window_on_off