58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
- id: calendar_coffee_machine_off
|
|
alias: "[Calendar] Coffee machine off"
|
|
mode: single
|
|
trigger:
|
|
- platform: calendar
|
|
event: start
|
|
entity_id: calendar.automations_wakeup
|
|
offset: '-16:00:0'
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.coffee_machine_electrical_measurement
|
|
above: 4
|
|
sequence:
|
|
- 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 on"
|
|
mode: single
|
|
trigger:
|
|
- platform: calendar
|
|
event: start
|
|
entity_id: calendar.automations_wakeup
|
|
condition:
|
|
- condition: state
|
|
entity_id: calendar.automations_wakeup
|
|
state: 'on'
|
|
action:
|
|
- service: switch.turn_on
|
|
target:
|
|
entity_id: switch.coffee_machine_on_off
|
|
|
|
- id: calendar_before_wakeup
|
|
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 |