Handling for wife's new desk and lighting setup

Tweak day mode scene for the desk
This commit is contained in:
2022-12-22 13:32:52 -05:00
parent 60a5164bc4
commit c6d5d30a02
7 changed files with 146 additions and 4 deletions

Submodule node-red/projects/NerdFlows updated: 819c634e5e...be18131875

View File

@ -20,6 +20,9 @@ input_boolean:
holiday_mode:
name: Holiday Mode
icon: mdi:string-lights
give_me_darkness:
name: Give Me Darkness
icon: mdi:weather-night
input_number:
upstairs_bathroom_motion_off_delay:
@ -182,6 +185,15 @@ input_select:
- Nightlight
initial: Select
icon: hue:room-dining
tina_desk_scenes:
name: Tina Desk Scenes
options:
- Select
- Day Mode
- Evening Mode
- Night Mode
initial: Select
icon: mdi:desk
holiday_animation:
name: Holiday Animation
options:
@ -215,6 +227,8 @@ input_text:
name: Front Porch Selected Scene
tina_lamp_selected_scene:
name: Tina Lamp Selected Scene
tina_desk_selected_scene:
name: Tina Desk Selected Scene
switch:
- platform: animated_scenes
@ -446,6 +460,60 @@ script:
target:
entity_id: input_boolean.white_noise_emma_bedroom
tina_desk_lights_handler:
alias: Tina Desk Lights Handler
mode: queued
max: 2
sequence:
- if:
- condition: state
entity_id: light.tina_desk_lights
state: 'off'
then:
- if:
- condition: state
entity_id: input_boolean.early_night_mode
state: 'off'
then:
- service: input_select.select_option
target:
entity_id: input_select.tina_desk_scenes
data:
option: Day Mode
- if:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.early_night_mode
state: 'on'
- condition: state
entity_id: input_boolean.give_me_darkness
state: 'off'
then:
- service: input_select.select_option
target:
entity_id: input_select.tina_desk_scenes
data:
option: Evening Mode
- if:
- condition: state
entity_id: input_boolean.give_me_darkness
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.tina_desk_scenes
data:
option: Night Mode
- if:
- condition: state
entity_id: light.tina_desk_lights
state: 'on'
then:
- service: light.turn_off
target:
entity_id: light.tina_desk_lights
scene:
- name: Adaptive in Living Room
icon: mdi:palette
@ -536,6 +604,53 @@ scene:
entities:
input_select.dining_room_lamp_scenes:
state: "Nightlight"
- name: Day Mode in Tina Desk
icon: mdi:palette
entities:
light.tina_lamp:
state: "on"
light.tina_desk_strip:
state: "on"
rgb_color:
- 0
- 255
- 255
brightness: 89
input_select.tina_lamp_scenes:
state: "Adaptive"
- name: Evening Mode in Tina Desk
icon: mdi:palette
entities:
light.tina_lamp:
state: "on"
input_select.tina_lamp_scenes:
state: "Adaptive"
light.tina_desk_strip:
state: "on"
rgb_color:
- 127
- 0
- 255
brightness: 128
- name: Night Mode in Tina Desk
icon: mdi:palette
entities:
switch.adaptive_lighting_tina_lamp:
state: "off"
light.tina_lamp:
state: "on"
rgb_color:
- 127
- 0
- 255
brightness: 51
light.tina_desk_strip:
state: "on"
rgb_color:
- 127
- 0
- 255
brightness: 128
- name: Adaptive in Tina Lamp
icon: mdi:palette
entities:

View File

@ -292,6 +292,7 @@ automation:
- light.living_room_color_3
- light.tina_lamp_top
- light.tina_lamp_side
- light.tina_desk_strip
- alias: "Save Current Adaptive State"
service: scene.create
data:
@ -311,6 +312,7 @@ automation:
entity_id:
- light.living_room_lights
- light.tina_lamp
- light.tina_desk_strip
data:
color_name: green
- alias: "Flash Lights"
@ -319,6 +321,7 @@ automation:
entity_id:
- light.living_room_lights
- light.tina_lamp
- light.tina_desk_strip
data:
flash: long
- alias: "End early if door opened"
@ -371,6 +374,7 @@ script:
- dining_room
- downstairs_bathroom
- upstairs_bathroom
- tina_desk
- service: fan.turn_off
target:
area_id:
@ -449,6 +453,8 @@ script:
- living_room
- dining_room
- mud_room
entity_id:
- light.tina_lamp
- delay:
hours: 0
minutes: 0
@ -458,10 +464,15 @@ script:
target:
entity_id:
- input_select.living_room_scenes
- input_select.tina_lamp_scenes
- input_select.mud_room_scenes
data:
option: Adaptive
- service: input_select.select_option
target:
entity_id:
- input_select.tina_desk_scenes
data:
option: Day Mode
- service: input_select.select_option
target:
entity_id: input_select.dining_room_lamp_scenes
@ -500,6 +511,7 @@ script:
- living_room
- dining_room
- mud_room
- tina_desk
- delay:
hours: 0
minutes: 0
@ -509,10 +521,15 @@ script:
target:
entity_id:
- input_select.living_room_scenes
- input_select.tina_lamp_scenes
- input_select.mud_room_scenes
data:
option: Adaptive
- service: input_select.select_option
target:
entity_id:
- input_select.tina_desk_scenes
data:
option: Night Mode
- service: input_select.select_option
target:
entity_id: input_select.dining_room_lamp_scenes

View File

@ -231,6 +231,7 @@ automation:
- light.living_room_color_3
- light.tina_lamp_side
- light.tina_lamp_top
- light.tina_desk_strip
- delay:
seconds: 1
- service: switch.turn_off
@ -243,6 +244,7 @@ automation:
entity_id:
- light.living_room_lights
- light.tina_lamp
- light.tina_desk_strip
data:
color_name: red
brightness_pct: 100

View File

@ -1581,6 +1581,7 @@ script:
- light.living_room_color_3
- light.tina_lamp_side
- light.tina_lamp_top
- light.tina_desk_strip
- service: light.turn_on
target:
entity_id:
@ -1589,6 +1590,7 @@ script:
- light.living_room_color_3
- light.tina_lamp_side
- light.tina_lamp_top
- light.tina_desk_strip
data:
color_name: red
- service: script.status_annc

View File

@ -31,13 +31,17 @@ give_me_darkness:
entity_id:
- switch.adaptive_lighting_sleep_mode_dining_room
data: {}
- service: input_select.select_option
data:
option: Night Mode
target:
entity_id: input_select.tina_desk_scenes
- service: input_select.select_option
target:
entity_id:
- input_select.upstairs_hallway_scenes
- input_select.mud_room_scenes
- input_select.upstairs_bathroom_scenes
- input_select.tina_lamp_scenes
data:
option: Nightlight
- service: light.turn_off

View File

@ -54,6 +54,7 @@
states.light.downstairs_bathroom_right,
states.light.tina_lamp_top,
states.light.tina_lamp_side,
states.light.tina_desk_strip,
states.light.basement_tall_lamp,
states.light.basement_short_lamp,
states.light.basement_stairwell,
@ -89,6 +90,7 @@
states.light.downstairs_bathroom_right,
states.light.tina_lamp_top,
states.light.tina_lamp_side,
states.light.tina_desk_strip,
states.light.living_room_christmas_tree
] %}
{{ lights | selectattr('state','eq','on') | list | count }}