Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
364c81e8b1
|
|||
0d42142a07
|
|||
7d6d72c6ef
|
|||
41228c1304
|
|||
b4f4d06d6c
|
|||
002919483f
|
|||
ef548c2df1
|
|||
1d60a4df32
|
|||
57c27d4e48
|
|||
c06bd894ae
|
|||
1b3cf79f25
|
|||
7cf9c13e38
|
|||
e8c6cd8deb
|
|||
df92fc4df6
|
|||
a936b22bb9
|
|||
9aa918d335
|
|||
c7d6297934
|
@ -1 +1 @@
|
|||||||
2025.3.4
|
2025.4.2
|
325
automations.yaml
325
automations.yaml
@ -311,102 +311,118 @@
|
|||||||
- id: '1651787468337'
|
- id: '1651787468337'
|
||||||
alias: Reboot handling
|
alias: Reboot handling
|
||||||
description: ''
|
description: ''
|
||||||
trigger:
|
triggers:
|
||||||
- platform: homeassistant
|
- event: start
|
||||||
event: start
|
|
||||||
id: hass_start
|
id: hass_start
|
||||||
- platform: homeassistant
|
trigger: homeassistant
|
||||||
event: shutdown
|
- event: shutdown
|
||||||
id: hass_stop
|
id: hass_stop
|
||||||
condition: []
|
trigger: homeassistant
|
||||||
action:
|
conditions: []
|
||||||
- if:
|
actions:
|
||||||
- condition: trigger
|
- alias: Routing
|
||||||
id: hass_start
|
choose:
|
||||||
alias: Startup
|
- conditions:
|
||||||
then:
|
- condition: trigger
|
||||||
- delay:
|
id: hass_start
|
||||||
hours: 0
|
alias: Startup
|
||||||
minutes: 1
|
sequence:
|
||||||
seconds: 0
|
- delay:
|
||||||
milliseconds: 0
|
hours: 0
|
||||||
- service: automation.turn_on
|
minutes: 1
|
||||||
data: {}
|
seconds: 0
|
||||||
target:
|
milliseconds: 0
|
||||||
entity_id:
|
- data: {}
|
||||||
- automation.family_has_arrived
|
target:
|
||||||
- automation.family_has_left
|
entity_id:
|
||||||
- automation.scheduled_alarm_rearm
|
- automation.family_has_arrived
|
||||||
- automation.scheduled_alarm_disarm
|
- automation.family_has_left
|
||||||
- service: switch.turn_off
|
- automation.scheduled_alarm_rearm
|
||||||
target:
|
- automation.scheduled_alarm_disarm
|
||||||
entity_id:
|
action: automation.turn_on
|
||||||
- switch.presence_simulation
|
- if:
|
||||||
data: {}
|
|
||||||
- if:
|
|
||||||
- condition: and
|
|
||||||
conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.holiday_mode
|
|
||||||
state: 'on'
|
|
||||||
alias: Is holiday mode on?
|
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.early_night_mode
|
entity_id: binary_sensor.early_night_mode
|
||||||
state: 'on'
|
state: 'off'
|
||||||
alias: Is early night mode on?
|
then:
|
||||||
alias: Test conditions
|
- action: input_boolean.turn_off
|
||||||
then:
|
metadata: {}
|
||||||
- service: switch.turn_on
|
data: {}
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.give_me_darkness
|
||||||
|
- input_boolean.night_mode
|
||||||
|
- input_boolean.goodnight
|
||||||
|
alias: If early night mode is off, turn off other night-related modes
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- switch.presence_simulation
|
||||||
data: {}
|
data: {}
|
||||||
|
action: switch.turn_off
|
||||||
|
- if:
|
||||||
|
- condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.holiday_mode
|
||||||
|
state: 'on'
|
||||||
|
alias: Is holiday mode on?
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.early_night_mode
|
||||||
|
state: 'on'
|
||||||
|
alias: Is early night mode on?
|
||||||
|
alias: Test conditions
|
||||||
|
then:
|
||||||
|
- data: {}
|
||||||
|
target:
|
||||||
|
entity_id: switch.animated_scene_{{ states('input_select.holiday_animation')
|
||||||
|
| lower }}
|
||||||
|
alias: Turn on the appropriate animated holiday scene
|
||||||
|
action: switch.turn_on
|
||||||
|
alias: Turn on animated holiday scene if night time and holiday mode is on
|
||||||
|
- data: {}
|
||||||
|
action: script.tony_desktop_refresh
|
||||||
|
- data: {}
|
||||||
|
action: script.tina_desktop_refresh
|
||||||
|
- data: {}
|
||||||
|
action: script.asus_laptop_refresh
|
||||||
|
- data: {}
|
||||||
|
action: script.kallen_desktop_refresh
|
||||||
|
- data: {}
|
||||||
|
action: script.win10vm_refresh
|
||||||
|
- data:
|
||||||
|
topic: house/basement/server/glances
|
||||||
|
payload: restart
|
||||||
|
qos: 0
|
||||||
|
retain: false
|
||||||
|
alias: Restart Glances via MQTT
|
||||||
|
action: mqtt.publish
|
||||||
|
- data: {}
|
||||||
|
alias: Reset all speaker volumes
|
||||||
|
action: script.volume_reset
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.studio_quiet
|
||||||
|
state: 'off'
|
||||||
|
then:
|
||||||
|
- data:
|
||||||
|
who: basement
|
||||||
|
call_ha_started: 1
|
||||||
|
action: script.status_annc
|
||||||
|
else:
|
||||||
|
- stop: Studio has requested quiet, and Jarvis respects this
|
||||||
|
alias: Announce back online, unless studio has requested quiet
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: hass_stop
|
||||||
|
alias: Shutdown
|
||||||
|
sequence:
|
||||||
|
- data:
|
||||||
|
stop_actions: true
|
||||||
target:
|
target:
|
||||||
entity_id: switch.animated_scene_{{ states('input_select.holiday_animation')
|
entity_id:
|
||||||
| lower }}
|
- automation.family_has_arrived
|
||||||
alias: Turn on the appropriate animated holiday scene
|
- automation.family_has_left
|
||||||
alias: Turn on animated holiday scene if night time and holiday mode is on
|
action: automation.turn_off
|
||||||
- service: script.tony_desktop_refresh
|
|
||||||
data: {}
|
|
||||||
- service: script.tina_desktop_refresh
|
|
||||||
data: {}
|
|
||||||
- service: script.asus_laptop_refresh
|
|
||||||
data: {}
|
|
||||||
- service: script.kallen_desktop_refresh
|
|
||||||
data: {}
|
|
||||||
- service: script.win10vm_refresh
|
|
||||||
data: {}
|
|
||||||
- service: mqtt.publish
|
|
||||||
data:
|
|
||||||
topic: house/basement/server/glances
|
|
||||||
payload: restart
|
|
||||||
qos: 0
|
|
||||||
retain: false
|
|
||||||
alias: Restart Glances via MQTT
|
|
||||||
- service: script.volume_reset
|
|
||||||
data: {}
|
|
||||||
alias: Reset all speaker volumes
|
|
||||||
- if:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.studio_quiet
|
|
||||||
state: 'off'
|
|
||||||
then:
|
|
||||||
- service: script.status_annc
|
|
||||||
data:
|
|
||||||
who: basement
|
|
||||||
call_ha_started: 1
|
|
||||||
else:
|
|
||||||
- stop: Studio has requested quiet, and Jarvis respects this
|
|
||||||
alias: Announce back online, unless studio has requested quiet
|
|
||||||
- if:
|
|
||||||
- condition: trigger
|
|
||||||
id: hass_stop
|
|
||||||
alias: Shutdown
|
|
||||||
then:
|
|
||||||
- service: automation.turn_off
|
|
||||||
data:
|
|
||||||
stop_actions: true
|
|
||||||
target:
|
|
||||||
entity_id:
|
|
||||||
- automation.family_has_arrived
|
|
||||||
- automation.family_has_left
|
|
||||||
mode: queued
|
mode: queued
|
||||||
- id: '1654547257475'
|
- id: '1654547257475'
|
||||||
alias: Battery Monitoring
|
alias: Battery Monitoring
|
||||||
@ -514,127 +530,126 @@
|
|||||||
- id: '1667341156218'
|
- id: '1667341156218'
|
||||||
alias: White Noise
|
alias: White Noise
|
||||||
description: ''
|
description: ''
|
||||||
trigger:
|
triggers:
|
||||||
- platform: state
|
- entity_id:
|
||||||
entity_id:
|
|
||||||
- input_boolean.white_noise_emma_bedroom
|
- input_boolean.white_noise_emma_bedroom
|
||||||
to: 'on'
|
to: 'on'
|
||||||
from: 'off'
|
from: 'off'
|
||||||
id: emma-on
|
id: emma-on
|
||||||
alias: Emma On
|
alias: Emma On
|
||||||
- platform: state
|
trigger: state
|
||||||
entity_id:
|
- entity_id:
|
||||||
- input_boolean.white_noise_basement
|
- input_boolean.white_noise_basement
|
||||||
to: 'on'
|
to: 'on'
|
||||||
from: 'off'
|
from: 'off'
|
||||||
id: basement-on
|
id: basement-on
|
||||||
alias: Basement On
|
alias: Basement On
|
||||||
- platform: state
|
trigger: state
|
||||||
entity_id:
|
- entity_id:
|
||||||
- input_boolean.white_noise_kallen_bedroom
|
- input_boolean.white_noise_kallen_bedroom
|
||||||
to: 'on'
|
to: 'on'
|
||||||
from: 'off'
|
from: 'off'
|
||||||
id: kallen-on
|
id: kallen-on
|
||||||
alias: Kallen On
|
alias: Kallen On
|
||||||
- platform: state
|
trigger: state
|
||||||
entity_id:
|
- entity_id:
|
||||||
- input_boolean.white_noise_emma_bedroom
|
- input_boolean.white_noise_emma_bedroom
|
||||||
from: 'on'
|
from: 'on'
|
||||||
to: 'off'
|
to: 'off'
|
||||||
id: emma-off
|
id: emma-off
|
||||||
alias: Emma Off
|
alias: Emma Off
|
||||||
- platform: state
|
trigger: state
|
||||||
entity_id:
|
- entity_id:
|
||||||
- input_boolean.white_noise_basement
|
- input_boolean.white_noise_basement
|
||||||
from: 'on'
|
from: 'on'
|
||||||
to: 'off'
|
to: 'off'
|
||||||
id: basement-off
|
id: basement-off
|
||||||
alias: Basement Off
|
alias: Basement Off
|
||||||
- platform: state
|
trigger: state
|
||||||
entity_id:
|
- entity_id:
|
||||||
- input_boolean.white_noise_kallen_bedroom
|
- input_boolean.white_noise_kallen_bedroom
|
||||||
from: 'on'
|
from: 'on'
|
||||||
to: 'off'
|
to: 'off'
|
||||||
id: kallen-off
|
id: kallen-off
|
||||||
alias: Kallen Off
|
alias: Kallen Off
|
||||||
|
trigger: state
|
||||||
- alias: Emma Timeout
|
- alias: Emma Timeout
|
||||||
platform: state
|
|
||||||
id: emma-timeout
|
id: emma-timeout
|
||||||
entity_id:
|
entity_id:
|
||||||
- media_player.emma_bedroom_google_speaker
|
- media_player.emma_bedroom_google_speaker
|
||||||
to: 'off'
|
to: 'off'
|
||||||
|
trigger: state
|
||||||
- alias: Basement Timeout
|
- alias: Basement Timeout
|
||||||
platform: state
|
|
||||||
id: basement-timeout
|
id: basement-timeout
|
||||||
entity_id:
|
entity_id:
|
||||||
- media_player.basement_google_speaker
|
- media_player.basement_google_speaker
|
||||||
to: 'off'
|
to: 'off'
|
||||||
|
trigger: state
|
||||||
- alias: Kallen Timeout
|
- alias: Kallen Timeout
|
||||||
platform: state
|
|
||||||
id: kallen-timeout
|
id: kallen-timeout
|
||||||
entity_id:
|
entity_id:
|
||||||
- media_player.kallen_bedroom_google_speaker
|
- media_player.kallen_bedroom_google_speaker
|
||||||
to: 'off'
|
to: 'off'
|
||||||
condition: []
|
trigger: state
|
||||||
action:
|
conditions: []
|
||||||
|
actions:
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: emma-on
|
id: emma-on
|
||||||
sequence:
|
sequence:
|
||||||
- alias: Start river sounds
|
- alias: Start river sounds
|
||||||
service: google_assistant_sdk.send_text_command
|
|
||||||
data:
|
data:
|
||||||
command: give me river noise on emma bedroom speaker
|
command: give me river noise on emma bedroom speaker
|
||||||
- service: media_player.volume_set
|
action: google_assistant_sdk.send_text_command
|
||||||
data:
|
- data:
|
||||||
volume_level: '{{ states(''input_number.emma_bedroom_google_speaker_night_volume'')
|
volume_level: '{{ states(''sensor.emma_bedroom_google_speaker_volume'')
|
||||||
}}'
|
}}'
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.emma_bedroom_google_speaker
|
entity_id: media_player.emma_bedroom_google_speaker
|
||||||
alias: Set volume
|
alias: Set volume
|
||||||
|
action: media_player.volume_set
|
||||||
alias: Emma On
|
alias: Emma On
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: basement-on
|
id: basement-on
|
||||||
sequence:
|
sequence:
|
||||||
- service: google_assistant_sdk.send_text_command
|
- data:
|
||||||
data:
|
|
||||||
command: give me thunderstorm sounds on basement studio speaker
|
command: give me thunderstorm sounds on basement studio speaker
|
||||||
alias: Start thunderstorm sounds
|
alias: Start thunderstorm sounds
|
||||||
- service: media_player.volume_set
|
action: google_assistant_sdk.send_text_command
|
||||||
data:
|
- data:
|
||||||
volume_level: '{{ states(''input_number.basement_google_speaker_night_volume'')
|
volume_level: '{{ states(''sensor.basement_google_speaker_volume'') }}'
|
||||||
}}'
|
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.basement_google_speaker
|
entity_id: media_player.basement_google_speaker
|
||||||
alias: Set volume
|
alias: Set volume
|
||||||
|
action: media_player.volume_set
|
||||||
alias: Basement On
|
alias: Basement On
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: kallen-on
|
id: kallen-on
|
||||||
sequence:
|
sequence:
|
||||||
- alias: Start river sounds
|
- alias: Start river sounds
|
||||||
service: google_assistant_sdk.send_text_command
|
|
||||||
data:
|
data:
|
||||||
command: give me river noise on kallen bedroom speaker
|
command: give me river noise on kallen bedroom speaker
|
||||||
- service: media_player.volume_set
|
action: google_assistant_sdk.send_text_command
|
||||||
data:
|
- data:
|
||||||
volume_level: '{{ states(''input_number.kallen_bedroom_google_speaker_night_volume'')
|
volume_level: '{{ states(''sensor.kallen_bedroom_google_speaker_volume'')
|
||||||
}}'
|
}}'
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.kallen_bedroom_google_speaker
|
entity_id: media_player.kallen_bedroom_google_speaker
|
||||||
alias: Set volume
|
alias: Set volume
|
||||||
|
action: media_player.volume_set
|
||||||
alias: Kallen On
|
alias: Kallen On
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: emma-off
|
id: emma-off
|
||||||
sequence:
|
sequence:
|
||||||
- service: media_player.turn_off
|
- data: {}
|
||||||
data: {}
|
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.emma_bedroom_google_speaker
|
entity_id: media_player.emma_bedroom_google_speaker
|
||||||
alias: Turn off speaker
|
alias: Turn off speaker
|
||||||
|
action: media_player.turn_off
|
||||||
- alias: If Emma is awake, reset volume
|
- alias: If Emma is awake, reset volume
|
||||||
if:
|
if:
|
||||||
- condition: state
|
- condition: state
|
||||||
@ -646,49 +661,44 @@
|
|||||||
minutes: 0
|
minutes: 0
|
||||||
seconds: 5
|
seconds: 5
|
||||||
milliseconds: 0
|
milliseconds: 0
|
||||||
- service: media_player.volume_set
|
- data:
|
||||||
data:
|
volume_level: '{{ states(''sensor.emma_bedroom_google_speaker_volume'')
|
||||||
volume_level: "{% if is_state('input_boolean.give_me_darkness','on') %}\n
|
}}'
|
||||||
\ {{ states('input_number.emma_bedroom_google_speaker_night_volume')
|
|
||||||
}}\n{% else %}\n {{ states('input_number.emma_bedroom_google_speaker_day_volume')
|
|
||||||
}}\n{% endif %}\n"
|
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.emma_bedroom_google_speaker
|
entity_id: media_player.emma_bedroom_google_speaker
|
||||||
alias: Reset volume
|
alias: Reset volume
|
||||||
|
action: media_player.volume_set
|
||||||
alias: Emma Off
|
alias: Emma Off
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: basement-off
|
id: basement-off
|
||||||
sequence:
|
sequence:
|
||||||
- service: media_player.turn_off
|
- data: {}
|
||||||
data: {}
|
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.basement_google_speaker
|
entity_id: media_player.basement_google_speaker
|
||||||
alias: Turn off speaker
|
alias: Turn off speaker
|
||||||
|
action: media_player.turn_off
|
||||||
- delay:
|
- delay:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 0
|
minutes: 0
|
||||||
seconds: 5
|
seconds: 5
|
||||||
milliseconds: 0
|
milliseconds: 0
|
||||||
- service: media_player.volume_set
|
- data:
|
||||||
data:
|
volume_level: '{{ states(''sensor.basement_google_speaker_volume'') }}'
|
||||||
volume_level: "{% if is_state('input_boolean.give_me_darkness','on') %}\n
|
|
||||||
{{ states('input_number.basement_google_speaker_night_volume') }}\n{%
|
|
||||||
else %}\n {{ states('input_number.basement_google_speaker_day_volume')
|
|
||||||
}}\n{% endif %}\n"
|
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.basement_google_speaker
|
entity_id: media_player.basement_google_speaker
|
||||||
alias: Reset volume
|
alias: Reset volume
|
||||||
|
action: media_player.volume_set
|
||||||
alias: Basement Off
|
alias: Basement Off
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: kallen-off
|
id: kallen-off
|
||||||
sequence:
|
sequence:
|
||||||
- service: media_player.turn_off
|
- data: {}
|
||||||
data: {}
|
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.kallen_bedroom_google_speaker
|
entity_id: media_player.kallen_bedroom_google_speaker
|
||||||
alias: Turn off speaker
|
alias: Turn off speaker
|
||||||
|
action: media_player.turn_off
|
||||||
- alias: If Kallen is awake, reset volume
|
- alias: If Kallen is awake, reset volume
|
||||||
if:
|
if:
|
||||||
- condition: and
|
- condition: and
|
||||||
@ -705,15 +715,13 @@
|
|||||||
minutes: 0
|
minutes: 0
|
||||||
seconds: 5
|
seconds: 5
|
||||||
milliseconds: 0
|
milliseconds: 0
|
||||||
- service: media_player.volume_set
|
- data:
|
||||||
data:
|
volume_level: '{{ states(''sensor.kallen_bedroom_google_speaker_volume'')
|
||||||
volume_level: "{% if is_state('input_boolean.give_me_darkness','on') %}\n
|
}}'
|
||||||
\ {{ states('input_number.kallen_bedroom_google_speaker_night_volume')
|
|
||||||
}}\n{% else %}\n {{ states('input_number.kallen_bedroom_google_speaker_day_volume')
|
|
||||||
}}\n{% endif %}\n"
|
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.kallen_bedroom_google_speaker
|
entity_id: media_player.kallen_bedroom_google_speaker
|
||||||
alias: Reset volume
|
alias: Reset volume
|
||||||
|
action: media_player.volume_set
|
||||||
alias: Kallen Off
|
alias: Kallen Off
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
@ -733,16 +741,16 @@
|
|||||||
seconds: 5
|
seconds: 5
|
||||||
milliseconds: 0
|
milliseconds: 0
|
||||||
- alias: Start river sounds
|
- alias: Start river sounds
|
||||||
service: google_assistant_sdk.send_text_command
|
|
||||||
data:
|
data:
|
||||||
command: give me river noise on emma bedroom speaker
|
command: give me river noise on emma bedroom speaker
|
||||||
- service: media_player.volume_set
|
action: google_assistant_sdk.send_text_command
|
||||||
data:
|
- data:
|
||||||
volume_level: '{{ states(''input_number.emma_bedroom_google_speaker_night_volume'')
|
volume_level: '{{ states(''sensor.emma_bedroom_google_speaker_volume'')
|
||||||
}}'
|
}}'
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.emma_bedroom_google_speaker
|
entity_id: media_player.emma_bedroom_google_speaker
|
||||||
alias: Set volume
|
alias: Set volume
|
||||||
|
action: media_player.volume_set
|
||||||
alias: Emma Timeout
|
alias: Emma Timeout
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
@ -762,16 +770,15 @@
|
|||||||
seconds: 5
|
seconds: 5
|
||||||
milliseconds: 0
|
milliseconds: 0
|
||||||
- alias: Start thunderstorm sounds
|
- alias: Start thunderstorm sounds
|
||||||
service: google_assistant_sdk.send_text_command
|
|
||||||
data:
|
data:
|
||||||
command: give me thunderstorm sounds on basement studio speaker
|
command: give me thunderstorm sounds on basement studio speaker
|
||||||
- service: media_player.volume_set
|
action: google_assistant_sdk.send_text_command
|
||||||
data:
|
- data:
|
||||||
volume_level: '{{ states(''input_number.basement_google_speaker_night_volume'')
|
volume_level: '{{ states(''sensor.basement_google_speaker_volume'') }}'
|
||||||
}}'
|
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.basement_google_speaker
|
entity_id: media_player.basement_google_speaker
|
||||||
alias: Set volume
|
alias: Set volume
|
||||||
|
action: media_player.volume_set
|
||||||
alias: Basement Timeout
|
alias: Basement Timeout
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
@ -791,16 +798,16 @@
|
|||||||
seconds: 5
|
seconds: 5
|
||||||
milliseconds: 0
|
milliseconds: 0
|
||||||
- alias: Start river sounds
|
- alias: Start river sounds
|
||||||
service: google_assistant_sdk.send_text_command
|
|
||||||
data:
|
data:
|
||||||
command: give me river noise on kallen bedroom speaker
|
command: give me river noise on kallen bedroom speaker
|
||||||
- service: media_player.volume_set
|
action: google_assistant_sdk.send_text_command
|
||||||
data:
|
- data:
|
||||||
volume_level: '{{ states(''input_number.kallen_bedroom_google_speaker_night_volume'')
|
volume_level: '{{ states(''sensor.kallen_bedroom_google_speaker_volume'')
|
||||||
}}'
|
}}'
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.kallen_bedroom_google_speaker
|
entity_id: media_player.kallen_bedroom_google_speaker
|
||||||
alias: Set volume
|
alias: Set volume
|
||||||
|
action: media_player.volume_set
|
||||||
alias: Kallen Timeout
|
alias: Kallen Timeout
|
||||||
mode: parallel
|
mode: parallel
|
||||||
max: 20
|
max: 20
|
||||||
|
@ -12,21 +12,62 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro period_str(team) %}
|
||||||
|
{% if state_attr(team,'league') in ['NFL','NCAAF'] %}
|
||||||
|
quarter
|
||||||
|
{% elif state_attr(team,'league') == 'MLB' %}
|
||||||
|
inning
|
||||||
|
{% else %}
|
||||||
|
period
|
||||||
|
{% endif %}
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro sports_clock(team) %}
|
||||||
|
{% macro data() %}
|
||||||
|
{% set period_str = period_str(team) %}
|
||||||
|
{% set game_clock = state_attr(team,'clock') | lower %}
|
||||||
|
{% if state_attr(team,'league') == 'MLB' %}
|
||||||
|
{% set inning_parts = game_clock.split(' ') %}
|
||||||
|
in the {{ inning_parts[0] ~ ' of the ' ~ inning_parts[1] ~ ' ' ~ period_str }}
|
||||||
|
{% else %}
|
||||||
|
{% if ' - ' in game_clock %}
|
||||||
|
{% set clock_time, quarter = game_clock.split(' - ') %}
|
||||||
|
with {{ clock_time ~ ' remaining in the ' ~ quarter ~ ' ' ~ period_str }}
|
||||||
|
{% else %}
|
||||||
|
with {{ game_clock ~ ' remaining in the ' ~ period_str }}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endmacro %}
|
||||||
|
{{ cleanup(data()) }}
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro sports_pregame(team) %}
|
{% macro sports_pregame(team) %}
|
||||||
{% macro data() %}
|
{% macro data() %}
|
||||||
|
{% if state_attr(team,'opponent_name') %}
|
||||||
|
{% set opponent_name = state_attr(team, 'opponent_name') %}
|
||||||
|
{% if opponent_name.endswith(' St') %}
|
||||||
|
{% set opponent_name = opponent_name | replace(' St', ' State') %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% if is_state(team,'PRE') %}
|
{% if is_state(team,'PRE') %}
|
||||||
{% set date = state_attr(team,'date') | as_timestamp | timestamp_custom('%m-%d') %}
|
{% set date = state_attr(team,'date') | as_timestamp | timestamp_custom('%m-%d') %}
|
||||||
{% if date == now().strftime('%m-%d') %}
|
{% if date == now().strftime('%m-%d') %}
|
||||||
The {{ state_attr(team,'friendly_name') }} will be playing today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} at {{ state_attr(team,'venue') }}.
|
The {{ state_attr(team,'friendly_name') }} will be playing today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} at {{ state_attr(team,'venue') }}.
|
||||||
{{ sports_str(team,'start') }} is at {{ state_attr(team,'date') | as_timestamp | timestamp_custom('%I:%M %p') }}.
|
{{ sports_str(team,'start') }} is at {{ state_attr(team,'date') | as_timestamp | timestamp_custom('%I:%M %p') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro%}
|
{% endmacro %}
|
||||||
{{ cleanup(data()) }}
|
{{ cleanup(data()) }}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro sports_main(team) %}
|
{% macro sports_main(team) %}
|
||||||
{% macro data() %}
|
{% macro data() %}
|
||||||
|
{% if state_attr(team,'opponent_name') %}
|
||||||
|
{% set opponent_name = state_attr(team, 'opponent_name') %}
|
||||||
|
{% if opponent_name.endswith(' St') %}
|
||||||
|
{% set opponent_name = opponent_name | replace(' St', ' State') %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% if is_state(team,'POST') %}
|
{% if is_state(team,'POST') %}
|
||||||
{% set date = state_attr(team,'date') | as_timestamp | timestamp_custom('%m-%d') %}
|
{% set date = state_attr(team,'date') | as_timestamp | timestamp_custom('%m-%d') %}
|
||||||
{% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %}
|
{% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %}
|
||||||
@ -34,11 +75,11 @@
|
|||||||
{% if state_attr(team,'clock') in ['postponed','Postponed'] %}
|
{% if state_attr(team,'clock') in ['postponed','Postponed'] %}
|
||||||
The {{ state_attr(team,'friendly_name') }} had their game postponed today, and it will be played at a later date.
|
The {{ state_attr(team,'friendly_name') }} had their game postponed today, and it will be played at a later date.
|
||||||
{% elif (state_attr(team,'team_score') | int) == state_attr(team,'opponent_score') | int %}
|
{% elif (state_attr(team,'team_score') | int) == state_attr(team,'opponent_score') | int %}
|
||||||
The {{ state_attr(team,'friendly_name') }} tied in their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
The {{ state_attr(team,'friendly_name') }} tied in their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||||
{% elif state_attr(team,'team_winner') == true %}
|
{% elif state_attr(team,'team_winner') == true %}
|
||||||
The {{ state_attr(team,'friendly_name') }} won their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
The {{ state_attr(team,'friendly_name') }} won their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||||
{% elif state_attr(team,'opponent_winner') == true %}
|
{% elif state_attr(team,'opponent_winner') == true %}
|
||||||
The {{ state_attr(team,'friendly_name') }} lost their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
The {{ state_attr(team,'friendly_name') }} lost their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
|
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
|
||||||
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
||||||
@ -47,11 +88,11 @@
|
|||||||
{% if state_attr(team,'clock') in ['postponed','Postponed'] %}
|
{% if state_attr(team,'clock') in ['postponed','Postponed'] %}
|
||||||
The {{ state_attr(team,'friendly_name') }} had their game postponed yesterday, and it will be played at a later date.
|
The {{ state_attr(team,'friendly_name') }} had their game postponed yesterday, and it will be played at a later date.
|
||||||
{% elif (state_attr(team,'team_score') | int) == state_attr(team,'opponent_score') | int %}
|
{% elif (state_attr(team,'team_score') | int) == state_attr(team,'opponent_score') | int %}
|
||||||
The {{ state_attr(team,'friendly_name') }} tied in their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
The {{ state_attr(team,'friendly_name') }} tied in their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||||
{% elif state_attr(team,'team_winner') == true %}
|
{% elif state_attr(team,'team_winner') == true %}
|
||||||
The {{ state_attr(team,'friendly_name') }} won their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
The {{ state_attr(team,'friendly_name') }} won their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||||
{% elif state_attr(team,'opponent_winner') == true %}
|
{% elif state_attr(team,'opponent_winner') == true %}
|
||||||
The {{ state_attr(team,'friendly_name') }} lost their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
The {{ state_attr(team,'friendly_name') }} lost their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
|
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
|
||||||
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
||||||
@ -59,11 +100,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state(team,'IN') %}
|
{% elif is_state(team,'IN') %}
|
||||||
{% if (state_attr(team,'team_score') | int) == (state_attr(team,'opponent_score') | int) %}
|
{% if (state_attr(team,'team_score') | int) == (state_attr(team,'opponent_score') | int) %}
|
||||||
The {{ state_attr(team,'friendly_name') }} are currently tied in their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
The {{ state_attr(team,'friendly_name') }} are currently tied in their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }} {{ sports_clock(team) }}.
|
||||||
{% elif (state_attr(team,'team_score') | int) > (state_attr(team,'opponent_score') | int) %}
|
{% elif (state_attr(team,'team_score') | int) > (state_attr(team,'opponent_score') | int) %}
|
||||||
The {{ state_attr(team,'friendly_name') }} are currently winning their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
The {{ state_attr(team,'friendly_name') }} are currently winning their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }} {{ sports_clock(team) }}.
|
||||||
{% else %}
|
{% else %}
|
||||||
The {{ state_attr(team,'friendly_name') }} are currently losing their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ state_attr(team,'opponent_name') }} with a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
The {{ state_attr(team,'friendly_name') }} are currently losing their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} with a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }} {{ sports_clock(team) }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
@ -118,9 +118,9 @@ template:
|
|||||||
availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||||
- name: "Master Bedroom Eco Mode"
|
- name: "Master Bedroom Eco Mode"
|
||||||
unique_id: edf36e23-adcf-4506-80eb-a14f4ea2fce0
|
unique_id: edf36e23-adcf-4506-80eb-a14f4ea2fce0
|
||||||
state: "{{ is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') }}"
|
state: "{{ is_state_attr('climate.master_bedroom_aircon','eco_mode',true) }}"
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') %}
|
{% if is_state_attr('climate.master_bedroom_aircon','eco_mode',true) %}
|
||||||
mdi:home-lightning-bolt
|
mdi:home-lightning-bolt
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:home-lightning-bolt-outline
|
mdi:home-lightning-bolt-outline
|
||||||
@ -148,9 +148,9 @@ template:
|
|||||||
availability: "{{ states('climate.emma_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
availability: "{{ states('climate.emma_bedroom_aircon') not in ['unavailable','unknown'] }}"
|
||||||
- name: "Emma Bedroom Eco Mode"
|
- name: "Emma Bedroom Eco Mode"
|
||||||
unique_id: 4b6fc8fc-4152-4d8b-ad8d-80f97fcabe44
|
unique_id: 4b6fc8fc-4152-4d8b-ad8d-80f97fcabe44
|
||||||
state: "{{ is_state_attr('climate.emma_bedroom_aircon','preset_mode','eco') }}"
|
state: "{{ is_state_attr('climate.emma_bedroom_aircon','eco_mode',true) }}"
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if is_state_attr('climate.emma_bedroom_aircon','preset_mode','eco') %}
|
{% if is_state_attr('climate.emma_bedroom_aircon','eco_mode',true) %}
|
||||||
mdi:home-lightning-bolt
|
mdi:home-lightning-bolt
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:home-lightning-bolt-outline
|
mdi:home-lightning-bolt-outline
|
||||||
|
@ -31,8 +31,7 @@ tts:
|
|||||||
region_name: 'us-east-1'
|
region_name: 'us-east-1'
|
||||||
text_type: ssml
|
text_type: ssml
|
||||||
voice: Joanna
|
voice: Joanna
|
||||||
cache: true
|
engine: generative
|
||||||
engine: neural
|
|
||||||
|
|
||||||
conversation:
|
conversation:
|
||||||
|
|
||||||
|
@ -489,6 +489,7 @@ input_select:
|
|||||||
- Evening Mode
|
- Evening Mode
|
||||||
- Night Mode
|
- Night Mode
|
||||||
- Bright Mode
|
- Bright Mode
|
||||||
|
- Reading Mode
|
||||||
- Reset
|
- Reset
|
||||||
initial: Select
|
initial: Select
|
||||||
icon: mdi:desk
|
icon: mdi:desk
|
||||||
@ -653,6 +654,21 @@ template:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
device_class: problem
|
device_class: problem
|
||||||
delay_on: "00:00:10"
|
delay_on: "00:00:10"
|
||||||
|
- name: Light Switch Issue
|
||||||
|
unique_id: 381e8038-ea96-474c-92ec-d1296dc1369e
|
||||||
|
state: >
|
||||||
|
{% set lights = states.light.upstairs_bathroom_lights,
|
||||||
|
states.light.hallway_overhead,
|
||||||
|
states.light.downstairs_bathroom_lights %}
|
||||||
|
{% set issues = lights | selectattr('state','eq','unavailable') | list | count %}
|
||||||
|
{{ issues > 0 }}
|
||||||
|
attributes:
|
||||||
|
issues: >
|
||||||
|
{% set lights = states.light.upstairs_bathroom_lights,
|
||||||
|
states.light.hallway_overhead,
|
||||||
|
states.light.downstairs_bathroom_lights %}
|
||||||
|
{% set ids = lights | selectattr('state','eq','unavailable') | map(attribute='attributes.friendly_name') | list %}
|
||||||
|
{{ ids | join(', ') }}
|
||||||
- sensor:
|
- sensor:
|
||||||
- name: "Basement Studio Lights - Brightness Actual"
|
- name: "Basement Studio Lights - Brightness Actual"
|
||||||
unique_id: dee4dc84-a6a0-4150-903e-5b8bd436d962
|
unique_id: dee4dc84-a6a0-4150-903e-5b8bd436d962
|
||||||
|
@ -198,6 +198,57 @@ input_number:
|
|||||||
step: 0.05
|
step: 0.05
|
||||||
icon: mdi:knob
|
icon: mdi:knob
|
||||||
|
|
||||||
|
template:
|
||||||
|
- sensor:
|
||||||
|
- name: "Basement Echo Dot Volume"
|
||||||
|
state: >
|
||||||
|
{% if is_state('input_boolean.give_me_darkness','on') %}
|
||||||
|
{{ states('input_number.basement_echo_dot_night_volume') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.basement_echo_dot_day_volume') }}
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:volume-high
|
||||||
|
- name: "Basement Google Speaker Volume"
|
||||||
|
state: >
|
||||||
|
{% if is_state('input_boolean.give_me_darkness','on') %}
|
||||||
|
{{ states('input_number.basement_google_speaker_night_volume') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.basement_google_speaker_day_volume') }}
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:volume-high
|
||||||
|
- name: "Living Room Echo Dot Volume"
|
||||||
|
state: >
|
||||||
|
{% if is_state('input_boolean.give_me_darkness','on') %}
|
||||||
|
{{ states('input_number.living_room_echo_dot_night_volume') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.living_room_echo_dot_day_volume') }}
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:volume-high
|
||||||
|
- name: "Master Bedroom Echo Dot Volume"
|
||||||
|
state: >
|
||||||
|
{% if is_state('input_boolean.give_me_darkness','on') or is_state('binary_sensor.people_sleeping','on') %}
|
||||||
|
{{ states('input_number.master_bedroom_echo_dot_night_volume') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.master_bedroom_echo_dot_day_volume') }}
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:volume-high
|
||||||
|
- name: "Kallen Bedroom Google Speaker Volume"
|
||||||
|
state: >
|
||||||
|
{% if is_state('input_boolean.give_me_darkness','on') or is_state('input_boolean.kallen_sleeping','on') %}
|
||||||
|
{{ states('input_number.kallen_bedroom_google_speaker_night_volume') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.kallen_bedroom_google_speaker_day_volume') }}
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:volume-high
|
||||||
|
- name: "Emma Bedroom Google Speaker Volume"
|
||||||
|
state: >
|
||||||
|
{% if is_state('input_boolean.give_me_darkness','on') or is_state('input_boolean.emma_sleeping','on') %}
|
||||||
|
{{ states('input_number.emma_bedroom_google_speaker_night_volume') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.emma_bedroom_google_speaker_day_volume') }}
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:volume-high
|
||||||
|
|
||||||
# Amazon Polly Sensors to see last message and location of audible notification
|
# Amazon Polly Sensors to see last message and location of audible notification
|
||||||
mqtt:
|
mqtt:
|
||||||
sensor:
|
sensor:
|
||||||
@ -325,24 +376,14 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set current = state_attr('media_player.basement_echo_dot','volume_level') | float %}
|
{% set current = state_attr('media_player.basement_echo_dot','volume_level') | float %}
|
||||||
{% set night = states('input_number.basement_echo_dot_night_volume') | float %}
|
{% set expected = states('sensor.basement_echo_dot_volume') | float %}
|
||||||
{% set day = states('input_number.basement_echo_dot_day_volume') | float %}
|
{{ current != expected }}
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ current != night }}
|
|
||||||
{% else %}
|
|
||||||
{{ current != day }}
|
|
||||||
{% endif %}
|
|
||||||
then:
|
then:
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.basement_echo_dot
|
entity_id: media_player.basement_echo_dot
|
||||||
data:
|
data:
|
||||||
volume_level: >
|
volume_level: "{{ states('sensor.basement_echo_dot_volume') }}"
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ states('input_number.basement_echo_dot_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.basement_echo_dot_day_volume') }}
|
|
||||||
{% endif %}
|
|
||||||
# Basement Google Speaker
|
# Basement Google Speaker
|
||||||
- if:
|
- if:
|
||||||
- condition: and
|
- condition: and
|
||||||
@ -373,24 +414,14 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set current = state_attr('media_player.basement_google_speaker','volume_level') | float %}
|
{% set current = state_attr('media_player.basement_google_speaker','volume_level') | float %}
|
||||||
{% set night = states('input_number.basement_google_speaker_night_volume') | float %}
|
{% set expected = states('sensor.basement_google_speaker_volume') | float %}
|
||||||
{% set day = states('input_number.basement_google_speaker_day_volume') | float %}
|
{{ current != expected }}
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ current != night }}
|
|
||||||
{% else %}
|
|
||||||
{{ current != day }}
|
|
||||||
{% endif %}
|
|
||||||
then:
|
then:
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.basement_google_speaker
|
entity_id: media_player.basement_google_speaker
|
||||||
data:
|
data:
|
||||||
volume_level: >
|
volume_level: "{{ states('sensor.basement_google_speaker_volume') }}"
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ states('input_number.basement_google_speaker_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.basement_google_speaker_day_volume') }}
|
|
||||||
{% endif %}
|
|
||||||
- service: media_player.volume_mute
|
- service: media_player.volume_mute
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.basement_google_speaker
|
entity_id: media_player.basement_google_speaker
|
||||||
@ -405,24 +436,14 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set current = state_attr('media_player.living_room_echo_dot','volume_level') | float %}
|
{% set current = state_attr('media_player.living_room_echo_dot','volume_level') | float %}
|
||||||
{% set night = states('input_number.living_room_echo_dot_night_volume') | float %}
|
{% set expected = states('sensor.living_room_echo_dot_volume') | float %}
|
||||||
{% set day = states('input_number.living_room_echo_dot_day_volume') | float %}
|
{{ current != expected }}
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ current != night }}
|
|
||||||
{% else %}
|
|
||||||
{{ current != day }}
|
|
||||||
{% endif %}
|
|
||||||
then:
|
then:
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.living_room_echo_dot
|
entity_id: media_player.living_room_echo_dot
|
||||||
data:
|
data:
|
||||||
volume_level: >
|
volume_level: "{{ states('sensor.living_room_echo_dot_volume') }}"
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ states('input_number.living_room_echo_dot_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.living_room_echo_dot_day_volume') }}
|
|
||||||
{% endif %}
|
|
||||||
# Master Bedroom Echo Dot
|
# Master Bedroom Echo Dot
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
@ -435,24 +456,14 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set current = state_attr('media_player.master_bedroom_echo_dot','volume_level') | float %}
|
{% set current = state_attr('media_player.master_bedroom_echo_dot','volume_level') | float %}
|
||||||
{% set night = states('input_number.master_bedroom_echo_dot_night_volume') | float %}
|
{% set expected = states('sensor.master_bedroom_echo_dot_volume') | float %}
|
||||||
{% set day = states('input_number.master_bedroom_echo_dot_day_volume') | float %}
|
{{ current != expected }}
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ current != night }}
|
|
||||||
{% else %}
|
|
||||||
{{ current != day }}
|
|
||||||
{% endif %}
|
|
||||||
then:
|
then:
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.master_bedroom_echo_dot
|
entity_id: media_player.master_bedroom_echo_dot
|
||||||
data:
|
data:
|
||||||
volume_level: >
|
volume_level: "{{ states('sensor.master_bedroom_echo_dot_volume') }}"
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ states('input_number.master_bedroom_echo_dot_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.master_bedroom_echo_dot_day_volume') }}
|
|
||||||
{% endif %}
|
|
||||||
# Kallen Bedroom Speaker
|
# Kallen Bedroom Speaker
|
||||||
- if:
|
- if:
|
||||||
- condition: and
|
- condition: and
|
||||||
@ -483,24 +494,14 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set current = state_attr('media_player.kallen_bedroom_google_speaker','volume_level') | float %}
|
{% set current = state_attr('media_player.kallen_bedroom_google_speaker','volume_level') | float %}
|
||||||
{% set night = states('input_number.kallen_bedroom_google_speaker_night_volume') | float %}
|
{% set expected = states('sensor.kallen_bedroom_google_speaker_volume') | float %}
|
||||||
{% set day = states('input_number.kallen_bedroom_google_speaker_day_volume') | float %}
|
{{ current != expected }}
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ current != night }}
|
|
||||||
{% else %}
|
|
||||||
{{ current != day }}
|
|
||||||
{% endif %}
|
|
||||||
then:
|
then:
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.kallen_bedroom_google_speaker
|
entity_id: media_player.kallen_bedroom_google_speaker
|
||||||
data:
|
data:
|
||||||
volume_level: >
|
volume_level: "{{ states('sensor.kallen_bedroom_google_speaker_volume') }}"
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ states('input_number.kallen_bedroom_google_speaker_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.kallen_bedroom_google_speaker_day_volume') }}
|
|
||||||
{% endif %}
|
|
||||||
- service: media_player.volume_mute
|
- service: media_player.volume_mute
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.kallen_bedroom_google_speaker
|
entity_id: media_player.kallen_bedroom_google_speaker
|
||||||
@ -536,24 +537,14 @@ script:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set current = state_attr('media_player.emma_bedroom_google_speaker','volume_level') | float %}
|
{% set current = state_attr('media_player.emma_bedroom_google_speaker','volume_level') | float %}
|
||||||
{% set night = states('input_number.emma_bedroom_google_speaker_night_volume') | float %}
|
{% set expected = states('sensor.emma_bedroom_google_speaker_volume') | float %}
|
||||||
{% set day = states('input_number.emma_bedroom_google_speaker_day_volume') | float %}
|
{{ current != expected }}
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ current != night }}
|
|
||||||
{% else %}
|
|
||||||
{{ current != day }}
|
|
||||||
{% endif %}
|
|
||||||
then:
|
then:
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.emma_bedroom_google_speaker
|
entity_id: media_player.emma_bedroom_google_speaker
|
||||||
data:
|
data:
|
||||||
volume_level: >
|
volume_level: "{{ states('sensor.kallen_bedroom_google_speaker_volume') }}"
|
||||||
{% if is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{{ states('input_number.emma_bedroom_google_speaker_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.emma_bedroom_google_speaker_day_volume') }}
|
|
||||||
{% endif %}
|
|
||||||
- service: media_player.volume_mute
|
- service: media_player.volume_mute
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.emma_bedroom_google_speaker
|
entity_id: media_player.emma_bedroom_google_speaker
|
||||||
@ -1237,11 +1228,9 @@ script:
|
|||||||
data:
|
data:
|
||||||
message: >
|
message: >
|
||||||
<voice name="{{ voice }}">
|
<voice name="{{ voice }}">
|
||||||
<amazon:auto-breaths>
|
|
||||||
<prosody rate="fast">
|
<prosody rate="fast">
|
||||||
{{ message }}
|
{{ message }}
|
||||||
</prosody>
|
</prosody>
|
||||||
</amazon:auto-breaths>
|
|
||||||
</voice>
|
</voice>
|
||||||
target: >
|
target: >
|
||||||
{% if who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room'] %}
|
{% if who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room'] %}
|
||||||
@ -1328,53 +1317,34 @@ script:
|
|||||||
media_player.basement_google_speaker
|
media_player.basement_google_speaker
|
||||||
{% endif %}
|
{% endif %}
|
||||||
volume_level: >-
|
volume_level: >-
|
||||||
{% set numbers_night = [
|
{% set numbers = [
|
||||||
states.input_number.emma_bedroom_google_speaker_night_volume.state,
|
states.sensor.emma_bedroom_google_speaker_volume.state,
|
||||||
states.input_number.kallen_bedroom_google_speaker_night_volume.state
|
states.sensor.kallen_bedroom_google_speaker_volume.state
|
||||||
] %}
|
] %}
|
||||||
{% set numbers_day = [
|
{% set kidsgroup = numbers | list | min | float %}
|
||||||
states.input_number.emma_bedroom_google_speaker_day_volume.state,
|
|
||||||
states.input_number.kallen_bedroom_google_speaker_day_volume.state
|
|
||||||
] %}
|
|
||||||
{% set kidsgroup_night = numbers_night | list | min | float %}
|
|
||||||
{% set kidsgroup_day = numbers_day | list | max | float %}
|
|
||||||
{% if type in ['critical'] %}
|
{% if type in ['critical'] %}
|
||||||
1.0
|
1.0
|
||||||
{% elif is_state('input_boolean.give_me_darkness','on') %}
|
|
||||||
{% if who in ['Everywhere','everywhere','kids_bedrooms','all_bedrooms'] %}
|
|
||||||
{% if is_state('input_boolean.emma_sleeping','on') and is_state('input_boolean.kallen_sleeping','off') %}
|
|
||||||
{{ states('input_number.kallen_bedroom_google_speaker_night_volume') }}
|
|
||||||
{% elif is_state('input_boolean.kallen_sleeping','on') and is_state('input_boolean.emma_sleeping','off') %}
|
|
||||||
{{ states('input_number.emma_bedroom_google_speaker_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
{{ kidsgroup_night }}
|
|
||||||
{% endif %}
|
|
||||||
{% elif who in ['kallen_bedroom','media_player.kallen_bedroom_google_speaker'] %}
|
|
||||||
{{ states('input_number.kallen_bedroom_google_speaker_night_volume') }}
|
|
||||||
{% elif who in ['emma_bedroom','media_player.emma_bedroom_google_speaker'] %}
|
|
||||||
{{ states('input_number.emma_bedroom_google_speaker_night_volume') }}
|
|
||||||
{% elif who in ['Basement Google','basement_google'] %}
|
|
||||||
{{ states('input_number.basement_google_speaker_night_volume') }}
|
|
||||||
{% else %}
|
|
||||||
0.3
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if who in ['Everywhere','everywhere','kids_bedrooms','all_bedrooms'] %}
|
{% if who in ['Everywhere','everywhere','kids_bedrooms','all_bedrooms'] %}
|
||||||
{% if is_state('input_boolean.emma_sleeping','on') and is_state('input_boolean.kallen_sleeping','off') %}
|
{% if is_state('input_boolean.emma_sleeping','on') and is_state('input_boolean.kallen_sleeping','off') %}
|
||||||
{{ states('input_number.kallen_bedroom_google_speaker_day_volume') }}
|
{{ states('sensor.kallen_bedroom_google_speaker_volume') }}
|
||||||
{% elif is_state('input_boolean.kallen_sleeping','on') and is_state('input_boolean.emma_sleeping','off') %}
|
{% elif is_state('input_boolean.kallen_sleeping','on') and is_state('input_boolean.emma_sleeping','off') %}
|
||||||
{{ states('input_number.emma_bedroom_google_speaker_day_volume') }}
|
{{ states('sensor.emma_bedroom_google_speaker_volume') }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ kidsgroup_day }}
|
{{ kidsgroup }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif who in ['kallen_bedroom','media_player.kallen_bedroom_google_speaker'] %}
|
{% elif who in ['kallen_bedroom','media_player.kallen_bedroom_google_speaker'] %}
|
||||||
{{ states('input_number.kallen_bedroom_google_speaker_day_volume') }}
|
{{ states('sensor.kallen_bedroom_google_speaker_volume') }}
|
||||||
{% elif who in ['emma_bedroom','media_player.emma_bedroom_google_speaker'] %}
|
{% elif who in ['emma_bedroom','media_player.emma_bedroom_google_speaker'] %}
|
||||||
{{ states('input_number.emma_bedroom_google_speaker_day_volume') }}
|
{{ states('sensor.emma_bedroom_google_speaker_volume') }}
|
||||||
{% elif who in ['Basement Google','basement_google'] %}
|
{% elif who in ['Basement Google','basement_google'] %}
|
||||||
{{ states('input_number.basement_google_speaker_day_volume') }}
|
{{ states('sensor.basement_google_speaker_volume') }}
|
||||||
{% else %}
|
{% else %}
|
||||||
0.6
|
{% if is_state('input_boolean.give_me_darkness','on') %}
|
||||||
|
0.3
|
||||||
|
{% else %}
|
||||||
|
0.6
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- service: tts.amazon_polly_say
|
- service: tts.amazon_polly_say
|
||||||
|
64
scenes.yaml
64
scenes.yaml
@ -1210,14 +1210,23 @@
|
|||||||
min_mireds: 153
|
min_mireds: 153
|
||||||
max_mireds: 500
|
max_mireds: 500
|
||||||
effect_list:
|
effect_list:
|
||||||
- None
|
- 'off'
|
||||||
- candle
|
- candle
|
||||||
- fire
|
- fire
|
||||||
- prism
|
- prism
|
||||||
|
- sparkle
|
||||||
|
- opal
|
||||||
|
- glisten
|
||||||
|
- underwater
|
||||||
|
- cosmos
|
||||||
|
- sunbeam
|
||||||
|
- enchant
|
||||||
|
- sunrise
|
||||||
|
- sunset
|
||||||
supported_color_modes:
|
supported_color_modes:
|
||||||
- color_temp
|
- color_temp
|
||||||
- xy
|
- xy
|
||||||
effect: None
|
effect: 'off'
|
||||||
color_mode: xy
|
color_mode: xy
|
||||||
brightness: 179
|
brightness: 179
|
||||||
color_temp_kelvin:
|
color_temp_kelvin:
|
||||||
@ -1244,14 +1253,23 @@
|
|||||||
min_mireds: 153
|
min_mireds: 153
|
||||||
max_mireds: 500
|
max_mireds: 500
|
||||||
effect_list:
|
effect_list:
|
||||||
- None
|
- 'off'
|
||||||
- candle
|
- candle
|
||||||
- fire
|
- fire
|
||||||
- prism
|
- prism
|
||||||
|
- sparkle
|
||||||
|
- opal
|
||||||
|
- glisten
|
||||||
|
- underwater
|
||||||
|
- cosmos
|
||||||
|
- sunbeam
|
||||||
|
- enchant
|
||||||
|
- sunrise
|
||||||
|
- sunset
|
||||||
supported_color_modes:
|
supported_color_modes:
|
||||||
- color_temp
|
- color_temp
|
||||||
- xy
|
- xy
|
||||||
effect: None
|
effect: 'off'
|
||||||
color_mode: xy
|
color_mode: xy
|
||||||
brightness: 255
|
brightness: 255
|
||||||
color_temp_kelvin:
|
color_temp_kelvin:
|
||||||
@ -1278,10 +1296,13 @@
|
|||||||
min_mireds: 153
|
min_mireds: 153
|
||||||
max_mireds: 500
|
max_mireds: 500
|
||||||
effect_list:
|
effect_list:
|
||||||
- None
|
- 'off'
|
||||||
- candle
|
- candle
|
||||||
- fire
|
- fire
|
||||||
- prism
|
- prism
|
||||||
|
- sparkle
|
||||||
|
- opal
|
||||||
|
- glisten
|
||||||
supported_color_modes:
|
supported_color_modes:
|
||||||
- color_temp
|
- color_temp
|
||||||
- xy
|
- xy
|
||||||
@ -1342,14 +1363,23 @@
|
|||||||
min_mireds: 153
|
min_mireds: 153
|
||||||
max_mireds: 500
|
max_mireds: 500
|
||||||
effect_list:
|
effect_list:
|
||||||
- None
|
- 'off'
|
||||||
- candle
|
- candle
|
||||||
- fire
|
- fire
|
||||||
- prism
|
- prism
|
||||||
|
- sparkle
|
||||||
|
- opal
|
||||||
|
- glisten
|
||||||
|
- underwater
|
||||||
|
- cosmos
|
||||||
|
- sunbeam
|
||||||
|
- enchant
|
||||||
|
- sunrise
|
||||||
|
- sunset
|
||||||
supported_color_modes:
|
supported_color_modes:
|
||||||
- color_temp
|
- color_temp
|
||||||
- xy
|
- xy
|
||||||
effect: None
|
effect: 'off'
|
||||||
color_mode: xy
|
color_mode: xy
|
||||||
brightness: 255
|
brightness: 255
|
||||||
color_temp_kelvin:
|
color_temp_kelvin:
|
||||||
@ -1376,14 +1406,23 @@
|
|||||||
min_mireds: 153
|
min_mireds: 153
|
||||||
max_mireds: 500
|
max_mireds: 500
|
||||||
effect_list:
|
effect_list:
|
||||||
- None
|
- 'off'
|
||||||
- candle
|
- candle
|
||||||
- fire
|
- fire
|
||||||
- prism
|
- prism
|
||||||
|
- sparkle
|
||||||
|
- opal
|
||||||
|
- glisten
|
||||||
|
- underwater
|
||||||
|
- cosmos
|
||||||
|
- sunbeam
|
||||||
|
- enchant
|
||||||
|
- sunrise
|
||||||
|
- sunset
|
||||||
supported_color_modes:
|
supported_color_modes:
|
||||||
- color_temp
|
- color_temp
|
||||||
- xy
|
- xy
|
||||||
effect: None
|
effect: 'off'
|
||||||
color_mode: xy
|
color_mode: xy
|
||||||
brightness: 255
|
brightness: 255
|
||||||
color_temp_kelvin:
|
color_temp_kelvin:
|
||||||
@ -1441,14 +1480,17 @@
|
|||||||
min_mireds: 153
|
min_mireds: 153
|
||||||
max_mireds: 500
|
max_mireds: 500
|
||||||
effect_list:
|
effect_list:
|
||||||
- None
|
- 'off'
|
||||||
- candle
|
- candle
|
||||||
- fire
|
- fire
|
||||||
- prism
|
- prism
|
||||||
|
- sparkle
|
||||||
|
- opal
|
||||||
|
- glisten
|
||||||
supported_color_modes:
|
supported_color_modes:
|
||||||
- color_temp
|
- color_temp
|
||||||
- xy
|
- xy
|
||||||
effect: None
|
effect: 'off'
|
||||||
color_mode: xy
|
color_mode: xy
|
||||||
brightness: 204
|
brightness: 204
|
||||||
color_temp_kelvin:
|
color_temp_kelvin:
|
||||||
|
93
scripts.yaml
93
scripts.yaml
@ -1544,14 +1544,14 @@ day_mode_in_tina_desk:
|
|||||||
alias: Day Mode in Tina Desk
|
alias: Day Mode in Tina Desk
|
||||||
sequence:
|
sequence:
|
||||||
- parallel:
|
- parallel:
|
||||||
- service: light.turn_on
|
- target:
|
||||||
target:
|
|
||||||
entity_id: light.tina_lamp_top
|
entity_id: light.tina_lamp_top
|
||||||
data: {}
|
data: {}
|
||||||
- service: light.turn_off
|
action: light.turn_on
|
||||||
target:
|
- target:
|
||||||
entity_id: light.tina_lamp_side
|
entity_id: light.tina_lamp_side
|
||||||
data: {}
|
data: {}
|
||||||
|
action: light.turn_off
|
||||||
- wait_template: '{{ is_state(''light.tina_lamp_side'',''off'') }}'
|
- wait_template: '{{ is_state(''light.tina_lamp_side'',''off'') }}'
|
||||||
timeout:
|
timeout:
|
||||||
seconds: 15
|
seconds: 15
|
||||||
@ -1561,52 +1561,57 @@ day_mode_in_tina_desk:
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: switch.adaptive_lighting_tina_lamp
|
entity_id: switch.adaptive_lighting_tina_lamp
|
||||||
state: 'off'
|
state: 'off'
|
||||||
alias: If switch is off
|
alias: If adaptive lighting is off
|
||||||
then:
|
then:
|
||||||
- service: switch.turn_on
|
- alias: Turn on adaptive lighting
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: switch.adaptive_lighting_tina_lamp
|
entity_id:
|
||||||
alias: Turn on the switch
|
- switch.adaptive_lighting_tina_lamp
|
||||||
|
- switch.adaptive_lighting_adapt_brightness_tina_lamp
|
||||||
|
- switch.adaptive_lighting_adapt_color_tina_lamp
|
||||||
|
action: switch.turn_on
|
||||||
else:
|
else:
|
||||||
- alias: Apply adaptive lighting
|
- alias: Apply adaptive lighting
|
||||||
service: adaptive_lighting.apply
|
|
||||||
data:
|
data:
|
||||||
entity_id: switch.adaptive_lighting_tina_lamp
|
entity_id: switch.adaptive_lighting_tina_lamp
|
||||||
adapt_brightness: true
|
adapt_brightness: true
|
||||||
adapt_color: true
|
adapt_color: true
|
||||||
|
action: adaptive_lighting.apply
|
||||||
mode: restart
|
mode: restart
|
||||||
icon: mdi:palette
|
icon: mdi:palette
|
||||||
evening_mode_in_tina_desk:
|
evening_mode_in_tina_desk:
|
||||||
alias: Evening Mode in Tina Desk
|
alias: Evening Mode in Tina Desk
|
||||||
sequence:
|
sequence:
|
||||||
- alias: Turn on lamp
|
- alias: Turn on lamp
|
||||||
service: light.turn_on
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- light.tina_lamp_top
|
- light.tina_lamp_top
|
||||||
- light.tina_lamp_side
|
- light.tina_lamp_side
|
||||||
|
action: light.turn_on
|
||||||
- alias: Apply adaptive lighting to lamp
|
- alias: Apply adaptive lighting to lamp
|
||||||
if:
|
if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: switch.adaptive_lighting_tina_lamp
|
entity_id: switch.adaptive_lighting_tina_lamp
|
||||||
state: 'off'
|
state: 'off'
|
||||||
alias: If switch is off
|
alias: If adaptive lighting is off
|
||||||
then:
|
then:
|
||||||
- service: switch.turn_on
|
- alias: Turn on adaptive lighting
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: switch.adaptive_lighting_tina_lamp
|
entity_id:
|
||||||
alias: Turn on the switch
|
- switch.adaptive_lighting_tina_lamp
|
||||||
|
- switch.adaptive_lighting_adapt_brightness_tina_lamp
|
||||||
|
- switch.adaptive_lighting_adapt_color_tina_lamp
|
||||||
|
action: switch.turn_on
|
||||||
else:
|
else:
|
||||||
- service: adaptive_lighting.apply
|
- alias: Apply adaptive lighting
|
||||||
data:
|
data:
|
||||||
entity_id: switch.adaptive_lighting_tina_lamp
|
entity_id: switch.adaptive_lighting_tina_lamp
|
||||||
adapt_brightness: true
|
adapt_brightness: true
|
||||||
adapt_color: true
|
adapt_color: true
|
||||||
turn_on_lights: true
|
action: adaptive_lighting.apply
|
||||||
alias: Apply adaptive lighting
|
|
||||||
mode: restart
|
mode: restart
|
||||||
icon: mdi:palette
|
icon: mdi:palette
|
||||||
night_mode_in_tina_desk:
|
night_mode_in_tina_desk:
|
||||||
@ -2476,25 +2481,26 @@ kallen_morning_meds:
|
|||||||
kallen_night_meds:
|
kallen_night_meds:
|
||||||
alias: Kallen Night Meds
|
alias: Kallen Night Meds
|
||||||
sequence:
|
sequence:
|
||||||
- service: counter.increment
|
- alias: Increment night reminder counter
|
||||||
metadata: {}
|
metadata: {}
|
||||||
data: {}
|
data: {}
|
||||||
alias: Increment night reminder counter
|
action: counter.increment
|
||||||
- service: script.text_notify
|
target:
|
||||||
data:
|
entity_id: counter.kallen_night_meds_reminder_count
|
||||||
|
- data:
|
||||||
type: alert
|
type: alert
|
||||||
who: all
|
who: all
|
||||||
message: clear_notification
|
message: clear_notification
|
||||||
tag: kallen-night-meds
|
tag: kallen-night-meds
|
||||||
alias: Clear previous night notification
|
alias: Clear previous night notification
|
||||||
|
action: script.text_notify
|
||||||
- delay:
|
- delay:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 0
|
minutes: 0
|
||||||
seconds: 5
|
seconds: 5
|
||||||
milliseconds: 0
|
milliseconds: 0
|
||||||
- parallel:
|
- parallel:
|
||||||
- service: script.text_notify
|
- data:
|
||||||
data:
|
|
||||||
who: "{% if states('person.christina_stork') in ['Bob Evans','BobEvans'] %}\n
|
who: "{% if states('person.christina_stork') in ['Bob Evans','BobEvans'] %}\n
|
||||||
\ tony\n{% else %}\n parents\n{% endif %}\n"
|
\ tony\n{% else %}\n parents\n{% endif %}\n"
|
||||||
type: alert
|
type: alert
|
||||||
@ -2507,8 +2513,8 @@ kallen_night_meds:
|
|||||||
- action: KALLEN_NIGHT_MEDS_SKIPPED
|
- action: KALLEN_NIGHT_MEDS_SKIPPED
|
||||||
title: Skip
|
title: Skip
|
||||||
alias: Send to parents
|
alias: Send to parents
|
||||||
|
action: script.text_notify
|
||||||
- alias: Send to Kallen
|
- alias: Send to Kallen
|
||||||
service: script.text_notify
|
|
||||||
data:
|
data:
|
||||||
who: kallen
|
who: kallen
|
||||||
type: alert
|
type: alert
|
||||||
@ -2520,6 +2526,7 @@ kallen_night_meds:
|
|||||||
title: Taken
|
title: Taken
|
||||||
- action: KALLEN_NIGHT_MEDS_SKIPPED
|
- action: KALLEN_NIGHT_MEDS_SKIPPED
|
||||||
title: Skip
|
title: Skip
|
||||||
|
action: script.text_notify
|
||||||
alias: Send text notifications
|
alias: Send text notifications
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
mode: restart
|
mode: restart
|
||||||
@ -3525,3 +3532,41 @@ tina_tylenol:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
max: 10
|
max: 10
|
||||||
description: ''
|
description: ''
|
||||||
|
reading_mode_in_tina_desk:
|
||||||
|
sequence:
|
||||||
|
- action: switch.turn_off
|
||||||
|
metadata: {}
|
||||||
|
data: {}
|
||||||
|
target:
|
||||||
|
entity_id: switch.adaptive_lighting_adapt_brightness_tina_lamp
|
||||||
|
alias: Turn off adaptive brightness, leave adaptive color on
|
||||||
|
- alias: Turn on lamp
|
||||||
|
action: light.turn_on
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
brightness_pct: 100
|
||||||
|
target:
|
||||||
|
entity_id: light.tina_desk_lights
|
||||||
|
- alias: Apply adaptive lighting to lamp
|
||||||
|
if:
|
||||||
|
- condition: state
|
||||||
|
entity_id: switch.adaptive_lighting_tina_lamp
|
||||||
|
state: 'off'
|
||||||
|
alias: If switch is off
|
||||||
|
then:
|
||||||
|
- data: {}
|
||||||
|
target:
|
||||||
|
entity_id: switch.adaptive_lighting_tina_lamp
|
||||||
|
alias: Turn on the switch
|
||||||
|
action: switch.turn_on
|
||||||
|
else:
|
||||||
|
- alias: Apply adaptive lighting
|
||||||
|
data:
|
||||||
|
entity_id: switch.adaptive_lighting_tina_lamp
|
||||||
|
adapt_color: true
|
||||||
|
turn_on_lights: true
|
||||||
|
adapt_brightness: false
|
||||||
|
action: adaptive_lighting.apply
|
||||||
|
alias: Reading Mode in Tina Desk
|
||||||
|
description: ''
|
||||||
|
icon: mdi:palette
|
||||||
|
Reference in New Issue
Block a user