K's school times are now set by the calendar
This commit is contained in:
@ -242,6 +242,12 @@ script:
|
|||||||
value_template: >
|
value_template: >
|
||||||
{{ 'Early Release' in states('sensor.school_event') }}
|
{{ 'Early Release' in states('sensor.school_event') }}
|
||||||
sequence:
|
sequence:
|
||||||
|
- service: input_datetime.set_datetime
|
||||||
|
target:
|
||||||
|
entity_id: input_datetime.school_day_start
|
||||||
|
data:
|
||||||
|
time: >
|
||||||
|
{{ as_timestamp(strptime(state_attr('calendar.kallen_school_days','start_time'), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%H:%M") }}
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
entity_id: input_boolean.school_early_release
|
entity_id: input_boolean.school_early_release
|
||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
@ -250,11 +256,18 @@ script:
|
|||||||
data:
|
data:
|
||||||
time: "14:45:00"
|
time: "14:45:00"
|
||||||
default:
|
default:
|
||||||
|
- service: input_datetime.set_datetime
|
||||||
|
target:
|
||||||
|
entity_id: input_datetime.school_day_start
|
||||||
|
data:
|
||||||
|
time: >
|
||||||
|
{{ as_timestamp(strptime(state_attr('calendar.kallen_school_days','start_time'), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%H:%M") }}
|
||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
target:
|
target:
|
||||||
entity_id: input_datetime.school_day_end
|
entity_id: input_datetime.school_day_end
|
||||||
data:
|
data:
|
||||||
time: "15:20:00"
|
time: >
|
||||||
|
{{ as_timestamp(strptime(state_attr('calendar.kallen_school_days','end_time'), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%H:%M") }}
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.school_today
|
- input_boolean.school_today
|
||||||
|
Reference in New Issue
Block a user