Migrate K late bedtime automation to UI #154

This commit is contained in:
2023-12-15 22:38:22 -05:00
parent 1934d7c52d
commit b31f32bd5b
2 changed files with 43 additions and 34 deletions

View File

@ -4240,20 +4240,57 @@
- timer-finished - timer-finished
alias: Timer finished alias: Timer finished
sequence: sequence:
- service: light.turn_on - alias: Turn on Christmas lights
service: light.turn_on
target: target:
entity_id: light.christmas_tree entity_id:
- light.christmas_tree
- light.christmas_lights_front_window
data: {} data: {}
alias: Turn on Christmas tree
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- sunrise - sunrise
alias: Sunrise alias: Sunrise
sequence: sequence:
- service: light.turn_off - alias: Turn off Christmas tree
service: light.turn_off
target: target:
entity_id: light.christmas_tree entity_id:
- light.christmas_tree
- light.christmas_lights_front_window
data: {} data: {}
alias: Turn off Christmas tree
mode: single mode: single
- id: '1702697525835'
alias: Kallen Late Bedtime
description: For those nights we want to let Kallen stay up later for whatever reason
trigger:
- platform: state
entity_id: input_boolean.kallen_late_bedtime
from: 'off'
to: 'on'
id: late-on
alias: Late Bedtime On
- platform: state
entity_id: input_boolean.kallen_late_bedtime
from: 'on'
to: 'off'
id: late-off
alias: Late Bedtime Off
condition:
- condition: time
after: input_datetime.kallen_wakeup_time
before: input_datetime.kallen_bedtime
alias: Time is between wakeup and bedtime
action:
- if:
- condition: state
entity_id: input_boolean.kallen_scheduling_evening_ran
state: 'on'
then:
- service: script.kallen_scheduling_evening
data: {}
- service: script.house_scheduling_evening
data: {}
alias: If scheduling has already run, set the new times
mode: restart

View File

@ -163,34 +163,6 @@ automation:
{% from 'time.jinja' import current_time %} {% from 'time.jinja' import current_time %}
{{ current_time('datetime',24) }} {{ current_time('datetime',24) }}
- id: 1d552b1f-c0ed-4d80-b8ba-3c085d2c3d3a
alias: "Kallen Late Bedtime"
description: "For those nights we want to let Kallen stay up later for whatever reason"
mode: restart
trigger:
- platform: state
entity_id: input_boolean.kallen_late_bedtime
from: 'off'
to: 'on'
id: late-on
- platform: state
entity_id: input_boolean.kallen_late_bedtime
from: 'on'
to: 'off'
id: late-off
condition:
- condition: time
after: input_datetime.kallen_wakeup_time
before: input_datetime.kallen_bedtime
action:
- if:
- condition: state
entity_id: input_boolean.kallen_scheduling_evening_ran
state: 'on'
then:
- service: script.kallen_scheduling_evening
- service: script.house_scheduling_evening
- id: 94b57d79-efe0-4f34-b5e3-baeaa5eea9f4 - id: 94b57d79-efe0-4f34-b5e3-baeaa5eea9f4
alias: Kallen Asleep alias: Kallen Asleep
trigger: trigger: