New night/goodnight handling
This commit is contained in:
@ -24,4 +24,7 @@ night_mode:
|
||||
icon: mdi:lightbulb-night
|
||||
toggle_testing:
|
||||
name: Toggle Testing
|
||||
icon: mdi:test-tube
|
||||
icon: mdi:test-tube
|
||||
goodnight:
|
||||
name: Goodnight
|
||||
icon: mdi:sleep
|
Submodule node-red/projects/NerdFlows updated: d15552b6be...ac67e152d5
@ -3,4 +3,7 @@
|
||||
input_boolean:
|
||||
kallen_sleeping:
|
||||
name: Kallen Sleeping
|
||||
icon: mdi:sleep
|
||||
icon: mdi:sleep
|
||||
kallen_computer_updates:
|
||||
name: Kallen Computer Updates
|
||||
icon: mdi:update
|
54
scripts.yaml
54
scripts.yaml
@ -217,6 +217,13 @@ max_brightness:
|
||||
going_upstairs:
|
||||
alias: Going Upstairs
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
qos: '2'
|
||||
retain: true
|
||||
topic: homeassistant/time/nightmode
|
||||
payload: 'on'
|
||||
alias: Tell MQTT that it is night mode now
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
option: Adaptive
|
||||
@ -248,9 +255,15 @@ going_upstairs:
|
||||
entity_id: media_player.basement_tv
|
||||
data: {}
|
||||
alias: Turn basement TV off, unless something is playing
|
||||
- service: script.kallen_desktop_shutdown
|
||||
data: {}
|
||||
alias: Shut down Kallen desktop
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_computer_updates
|
||||
state: 'off'
|
||||
then:
|
||||
- service: script.kallen_desktop_shutdown
|
||||
data: {}
|
||||
alias: Shut down Kallen desktop
|
||||
alias: Shutdown Kallen Desktop, unless it is updating
|
||||
- service: script.asus_laptop_shutdown
|
||||
data: {}
|
||||
alias: Shut down laptop
|
||||
@ -278,26 +291,21 @@ going_upstairs:
|
||||
target:
|
||||
entity_id: light.basement_studio_lights
|
||||
alias: Turn off the lights
|
||||
- wait_for_trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.upstairs_bathroom_motion
|
||||
to: 'on'
|
||||
timeout: 00:05:00
|
||||
alias: Wait until I'm in the bathroom
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
option: Side Nightlight
|
||||
target:
|
||||
entity_id: input_select.master_bedroom_scenes
|
||||
alias: Turn on dim lighting in master bedroom
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
qos: '2'
|
||||
retain: true
|
||||
topic: homeassistant/time/nightmode
|
||||
payload: 'on'
|
||||
alias: Tell MQTT that it is night mode now
|
||||
- wait_template: '{{ is_state(''binary_sensor.upstairs_bathroom_motion'',''on'')
|
||||
or is_state(''input_boolean.goodnight'',''on'') }}'
|
||||
timeout: 00:10:00
|
||||
alias: Wait until I'm in the bathroom or in bed
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.goodnight
|
||||
state: 'off'
|
||||
then:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
option: Side Nightlight
|
||||
target:
|
||||
entity_id: input_select.master_bedroom_scenes
|
||||
alias: Turn on dim lighting in master bedroom, unless I am in bed
|
||||
mode: single
|
||||
icon: hue:room-stairs
|
||||
start_youtube_basement:
|
||||
|
Reference in New Issue
Block a user