Merge context resets as planned in #127
This commit is contained in:
@ -150,13 +150,83 @@ automation:
|
||||
- service: script.security_scheduling
|
||||
|
||||
- id: 7350300d-94d3-4ea3-97bb-b0673eafd71f
|
||||
alias: Scheduling Reset
|
||||
description: "Reset all 'Briefing Ran' input booleans for the next day"
|
||||
alias: Scheduled Reset
|
||||
description: "Reset all context entities for the next day at the appropriate times"
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "00:00:00"
|
||||
id: midnight
|
||||
- platform: time
|
||||
at: input_datetime.audible_notification_off
|
||||
id: audible-off
|
||||
- platform: time
|
||||
at: input_datetime.kallen_school_day_end
|
||||
id: school-end
|
||||
- platform: state
|
||||
entity_id: sensor.twitch_ironnerd24
|
||||
from: 'streaming'
|
||||
to: 'offline'
|
||||
id: stream-offline
|
||||
- platform: time
|
||||
at: "06:00:00"
|
||||
id: six
|
||||
action:
|
||||
- service: script.scheduling_reset
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: midnight
|
||||
sequence:
|
||||
- service: script.scheduling_reset
|
||||
- service: script.kallen_school_reset_late
|
||||
- service: automation.turn_on
|
||||
target:
|
||||
entity_id:
|
||||
- automation.scheduled_alarm_rearm
|
||||
- automation.scheduled_alarm_disarm
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- input_boolean.skip_disarm
|
||||
- input_boolean.skip_rearm
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: audible-off
|
||||
sequence:
|
||||
- service: script.reset_annc_switches
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id:
|
||||
- input_number.back_door_opened_today
|
||||
- input_number.front_door_opened_today
|
||||
- input_number.basement_studio_door_opened_today
|
||||
- input_number.downstairs_bathroom_door_opened_today
|
||||
data:
|
||||
value: 0
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: school-end
|
||||
sequence:
|
||||
- service: script.kallen_school_reset
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: stream-offline
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.tony_streaming_today
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: six
|
||||
sequence:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: sensor.twitch_ironnerd24
|
||||
state: 'offline'
|
||||
then:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.tony_streaming_today
|
||||
|
||||
script:
|
||||
kallen_scheduling_morning:
|
||||
|
Reference in New Issue
Block a user