Files
sarah/config/packages/modes/house_mode.yaml
T

52 lines
1.1 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