mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-05 08:44:24 +00:00
64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
# Mode config
|
|
input_select:
|
|
house_mode:
|
|
name: House mode
|
|
icon: mdi:home-analytics
|
|
options:
|
|
- day
|
|
- bed
|
|
- night
|
|
|
|
binary_sensor:
|
|
- platform: template
|
|
sensors:
|
|
house_mode:
|
|
friendly_name: House mode
|
|
value_template: "{{ states('input_select.house_mode') }}"
|
|
icon_template: >-
|
|
|
|
{% if is_state('input_select.house_mode', 'day') %}
|
|
mdi:weather-sunny
|
|
{% elif is_state('input_select.house_mode', 'bed') %}
|
|
mdi:bed-king-outline
|
|
{% else %}
|
|
mdi:weather-night
|
|
{% endif %}
|
|
|
|
|
|
automation:
|
|
- alias: House mode · Set to day
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_select.house_mode
|
|
to: "day"
|
|
action:
|
|
- service: script.routine_waking_up
|
|
|
|
- alias: House mode · Set to bed
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_select.house_mode
|
|
to: "bed"
|
|
action:
|
|
- service: script.routine_bedtime
|
|
|
|
- alias: House mode · Set to night
|
|
trigger:
|
|
platform: state
|
|
entity_id: input_select.house_mode
|
|
to: "night"
|
|
action:
|
|
- service: script.routine_good_night
|
|
|
|
- alias: House mode · Toggle on bedside switch double click
|
|
trigger:
|
|
- platform: event
|
|
event_type: zha_event
|
|
event_data:
|
|
device_ieee: !secret master_bedroom_bedside_switch_ieee
|
|
command: double
|
|
action:
|
|
- service: input_select.select_next
|
|
entity_id: input_select.house_mode
|
|
|