Added blackout time for the kid during the summer...just getting to pushing this change
This commit is contained in:
parent
909e5f9877
commit
6048d5f7bc
|
@ -9,13 +9,16 @@ input_boolean:
|
||||||
rex_manning_audio:
|
rex_manning_audio:
|
||||||
name: Rex Manning audio
|
name: Rex Manning audio
|
||||||
icon: mdi:speaker-wireless
|
icon: mdi:speaker-wireless
|
||||||
|
blackout_time:
|
||||||
|
name: Blackout Time
|
||||||
|
icon: mdi:closed-octagon
|
||||||
|
|
||||||
input_datetime:
|
input_datetime:
|
||||||
school_first_day:
|
school_first_day:
|
||||||
name: First Day of School
|
name: First Day of School
|
||||||
has_date: true
|
has_date: true
|
||||||
has_time: false
|
has_time: false
|
||||||
initial: '2020-08-05'
|
initial: '2020-08-12'
|
||||||
school_last_day:
|
school_last_day:
|
||||||
name: Last Day of School
|
name: Last Day of School
|
||||||
has_date: true
|
has_date: true
|
||||||
|
@ -31,6 +34,16 @@ input_datetime:
|
||||||
has_date: false
|
has_date: false
|
||||||
has_time: true
|
has_time: true
|
||||||
initial: '14:45:00'
|
initial: '14:45:00'
|
||||||
|
blackout_time_start:
|
||||||
|
name: Blackout Time Start
|
||||||
|
has_date: false
|
||||||
|
has_time: true
|
||||||
|
initial: '12:00:00'
|
||||||
|
blackout_time_end:
|
||||||
|
name: Blackout Time End
|
||||||
|
has_date: false
|
||||||
|
has_time: true
|
||||||
|
initial: '16:00:00'
|
||||||
|
|
||||||
input_number:
|
input_number:
|
||||||
skylar_ps_time:
|
skylar_ps_time:
|
||||||
|
@ -155,16 +168,67 @@ automation:
|
||||||
data_template:
|
data_template:
|
||||||
version: "{{ states.binary_sensor.updater.attributes.newest_version }}"
|
version: "{{ states.binary_sensor.updater.attributes.newest_version }}"
|
||||||
|
|
||||||
# - id: set_skylar_activity_full
|
- id: blackout_time_start
|
||||||
# alias: Skylar Full Privileges
|
initial_state: true
|
||||||
# initial_state: true
|
alias: Blackout time Start
|
||||||
# trigger:
|
trigger:
|
||||||
# - platform: state
|
platform: template
|
||||||
# entity_id: input_select.skylar_activity
|
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.blackout_time_start', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||||
# to: 'Full'
|
condition:
|
||||||
# action:
|
condition: template
|
||||||
# - service: scene.turn_on
|
value_template: '{{ states.calendar.skylar_school.state == "Off" }}'
|
||||||
# entity_id: scene.skylar_full
|
action:
|
||||||
|
- service: script.ah_report
|
||||||
|
data:
|
||||||
|
call_interuption: 1
|
||||||
|
speech_message: "Blackout time has started."
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
entity_id: input_boolean.blackout_time
|
||||||
|
|
||||||
|
- id: blackout_time_end
|
||||||
|
initial_state: true
|
||||||
|
alias: Blackout time End
|
||||||
|
trigger:
|
||||||
|
platform: template
|
||||||
|
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.blackout_time_end', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||||
|
condition:
|
||||||
|
condition: state
|
||||||
|
entity_id: input_boolean.blackout_time
|
||||||
|
state: 'on'
|
||||||
|
action:
|
||||||
|
- service: script.ah_report
|
||||||
|
data:
|
||||||
|
call_interuption: 1
|
||||||
|
speech_message: "Blackout time has ended"
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
entity_id: input_boolean.blackout_time
|
||||||
|
|
||||||
|
- id: digital_learning_start
|
||||||
|
alias: Digital Learning Start
|
||||||
|
initial_state: true
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: calendar.skylar_school
|
||||||
|
to: 'on'
|
||||||
|
action:
|
||||||
|
- service: scene.turn_on
|
||||||
|
entity_id: scene.skylar_desk_on
|
||||||
|
- service: script.turn_on
|
||||||
|
entity_id: script.digital_learning_notification
|
||||||
|
|
||||||
|
- id: digital_learning_end
|
||||||
|
alias: Digital Learning End
|
||||||
|
initial_state: true
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: calendar.skylar_school
|
||||||
|
to: 'off'
|
||||||
|
action:
|
||||||
|
- service: scene.turn_on
|
||||||
|
entity_id: scene.skylar_desk_off
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
entity_id: input_boolean.audible_notifications
|
||||||
|
|
||||||
|
|
||||||
# - id: set_skylar_activity_limited
|
# - id: set_skylar_activity_limited
|
||||||
# alias: Skylar Limited Privileges
|
# alias: Skylar Limited Privileges
|
||||||
|
@ -210,6 +274,19 @@ script:
|
||||||
media_content_id: http://192.168.7.40/audio/Rex_Manning_-_Say_No_More_Mon_Amour.mp3
|
media_content_id: http://192.168.7.40/audio/Rex_Manning_-_Say_No_More_Mon_Amour.mp3
|
||||||
media_content_type: "music"
|
media_content_type: "music"
|
||||||
|
|
||||||
|
digital_learning_notification:
|
||||||
|
sequence:
|
||||||
|
- condition: state
|
||||||
|
entity_id: sensor.family_status
|
||||||
|
state: Home
|
||||||
|
- service: script.ah_report
|
||||||
|
data:
|
||||||
|
speech_message: "Skylar, digital learning will begin in about thirty minutes. I have turned on the lighting around your desk. I will be disabling audible notifications during school hours."
|
||||||
|
- delay:
|
||||||
|
minutes: 5
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
entity_id: input_boolean.audible_notifications
|
||||||
|
|
||||||
rest_command:
|
rest_command:
|
||||||
new_version_github_issue:
|
new_version_github_issue:
|
||||||
url: https://api.github.com/repos/thejeffreystone/home-assistant-configuration/issues
|
url: https://api.github.com/repos/thejeffreystone/home-assistant-configuration/issues
|
||||||
|
|
Loading…
Reference in New Issue