1
0
ansible-home-assistant/configuration/automations/calendar.yaml

33 lines
841 B
YAML

- id: calendar-coffee-machine-off
alias: "[Calendar] Coffee machine"
mode: single
trigger:
- platform: calendar
event: start
entity_id: calendar.automations_sleep
offset: '-8:00:0'
action:
- wait_for_trigger:
- platform: numeric_state
entity_id: sensor.coffee_machine_electrical_measurement
below: '4'
- service: switch.turn_off
target:
entity_id: switch.coffee_machine_on_off
- id: calendar-coffee-machine-on
alias: "[Calendar] Coffee machine"
mode: single
trigger:
- platform: calendar
event: end
entity_id: calendar.automations_sleep
condition:
- condition: state
entity_id: calendar.automations_sleep
state: 'off'
action:
- service: switch.turn_on
target:
entity_id: switch.coffee_machine_on_off