Files
sarah/config/packages/modules/climate/windows.yaml
T
2020-05-31 18:56:39 +03:00

68 lines
2.5 KiB
YAML

binary_sensor:
- platform: template
sensors:
living_room_right_window:
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:
friendly_name: Bedroom right 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 %}
bedroom_left_window:
friendly_name: Bedroom left window
device_class: window
value_template: "{{ is_state('binary_sensor.bedroom_left_window_raw', 'on') }}"
entity_id: binary_sensor.bedroom_left_window_raw
icon_template: >
{% if is_state('binary_sensor.bedroom_left_window_raw', 'on') %} mdi:window-open-variant
{% else %} mdi:window-closed-variant
{% endif %}
kitchen_window:
friendly_name: Kitchen window
device_class: window
value_template: "{{ is_state('binary_sensor.kitchen_window_raw', 'on') }}"
entity_id: binary_sensor.kitchen_window_raw
icon_template: >
{% if is_state('binary_sensor.kitchen_window_raw', 'on') %} mdi:window-open-variant
{% 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
#
# ─── CUSTOMIZATION ──────────────────────────────────────────────────────────────
#
homeassistant:
customize:
sensor.living_room_right_window_power:
friendly_name: Living room window battery
sensor.bedroom_left_window_power:
friendly_name: Bedroom left window battery
sensor.bedroom_right_window_power:
friendly_name: Bedroom right window battery
sensor.kitchen_window_power:
friendly_name: Kitchen window battery