New night/goodnight handling
This commit is contained in:
@ -25,3 +25,6 @@ night_mode:
|
|||||||
toggle_testing:
|
toggle_testing:
|
||||||
name: 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
@ -4,3 +4,6 @@ input_boolean:
|
|||||||
kallen_sleeping:
|
kallen_sleeping:
|
||||||
name: 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:
|
going_upstairs:
|
||||||
alias: Going Upstairs
|
alias: Going Upstairs
|
||||||
sequence:
|
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
|
- service: input_select.select_option
|
||||||
data:
|
data:
|
||||||
option: Adaptive
|
option: Adaptive
|
||||||
@ -248,9 +255,15 @@ going_upstairs:
|
|||||||
entity_id: media_player.basement_tv
|
entity_id: media_player.basement_tv
|
||||||
data: {}
|
data: {}
|
||||||
alias: Turn basement TV off, unless something is playing
|
alias: Turn basement TV off, unless something is playing
|
||||||
- service: script.kallen_desktop_shutdown
|
- if:
|
||||||
data: {}
|
- condition: state
|
||||||
alias: Shut down Kallen desktop
|
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
|
- service: script.asus_laptop_shutdown
|
||||||
data: {}
|
data: {}
|
||||||
alias: Shut down laptop
|
alias: Shut down laptop
|
||||||
@ -278,26 +291,21 @@ going_upstairs:
|
|||||||
target:
|
target:
|
||||||
entity_id: light.basement_studio_lights
|
entity_id: light.basement_studio_lights
|
||||||
alias: Turn off the lights
|
alias: Turn off the lights
|
||||||
- wait_for_trigger:
|
- wait_template: '{{ is_state(''binary_sensor.upstairs_bathroom_motion'',''on'')
|
||||||
- platform: state
|
or is_state(''input_boolean.goodnight'',''on'') }}'
|
||||||
entity_id:
|
timeout: 00:10:00
|
||||||
- binary_sensor.upstairs_bathroom_motion
|
alias: Wait until I'm in the bathroom or in bed
|
||||||
to: 'on'
|
- if:
|
||||||
timeout: 00:05:00
|
- condition: state
|
||||||
alias: Wait until I'm in the bathroom
|
entity_id: input_boolean.goodnight
|
||||||
- service: input_select.select_option
|
state: 'off'
|
||||||
data:
|
then:
|
||||||
option: Side Nightlight
|
- service: input_select.select_option
|
||||||
target:
|
data:
|
||||||
entity_id: input_select.master_bedroom_scenes
|
option: Side Nightlight
|
||||||
alias: Turn on dim lighting in master bedroom
|
target:
|
||||||
- service: mqtt.publish
|
entity_id: input_select.master_bedroom_scenes
|
||||||
data:
|
alias: Turn on dim lighting in master bedroom, unless I am in bed
|
||||||
qos: '2'
|
|
||||||
retain: true
|
|
||||||
topic: homeassistant/time/nightmode
|
|
||||||
payload: 'on'
|
|
||||||
alias: Tell MQTT that it is night mode now
|
|
||||||
mode: single
|
mode: single
|
||||||
icon: hue:room-stairs
|
icon: hue:room-stairs
|
||||||
start_youtube_basement:
|
start_youtube_basement:
|
||||||
|
Reference in New Issue
Block a user