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

58 lines
1.5 KiB
YAML
Raw Normal View History

- id: calendar_coffee_machine_off
2022-10-26 14:57:29 +02:00
alias: "[Calendar] Coffee machine off"
2021-07-18 22:04:56 +02:00
mode: single
trigger:
2022-07-10 12:34:59 +02:00
- platform: calendar
event: start
2022-10-26 14:57:29 +02:00
entity_id: calendar.automations_wakeup
offset: '-16:00:0'
2021-07-18 22:04:56 +02:00
action:
2022-11-16 01:27:05 +01:00
- choose:
- conditions:
2022-11-17 00:52:27 +01:00
- condition: numeric_state
2022-11-16 01:27:05 +01:00
entity_id: sensor.coffee_machine_electrical_measurement
2022-11-17 00:52:27 +01:00
above: 4
2022-11-16 01:27:05 +01:00
sequence:
- wait_for_trigger:
- platform: numeric_state
entity_id: sensor.coffee_machine_electrical_measurement
below: '4'
2021-07-18 22:04:56 +02:00
- service: switch.turn_off
target:
entity_id: switch.coffee_machine_on_off
- id: calendar_coffee_machine_on
2022-10-26 14:57:29 +02:00
alias: "[Calendar] Coffee machine on"
2021-07-18 22:04:56 +02:00
mode: single
trigger:
2022-07-10 12:34:59 +02:00
- platform: calendar
2022-10-26 14:57:29 +02:00
event: start
entity_id: calendar.automations_wakeup
2021-07-18 22:04:56 +02:00
condition:
- condition: state
2022-10-26 14:57:29 +02:00
entity_id: calendar.automations_wakeup
state: 'on'
2021-07-18 22:04:56 +02:00
action:
- service: switch.turn_on
target:
entity_id: switch.coffee_machine_on_off
2022-12-15 00:41:40 +01:00
- id: calendar_before_wakeup
2022-12-15 00:41:40 +01:00
alias: "[Calendar] Before wakeup"
mode: single
trigger:
- platform: calendar
event: start
entity_id: calendar.automations_wakeup
offset: '-1:00:0'
condition:
- condition: or
conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_home
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
action:
- service: script.before_wakeup