Begin simplification of wife's desk lighting

This commit is contained in:
2025-02-18 15:40:35 -05:00
parent a96bc99271
commit ec0aed386a
4 changed files with 63 additions and 154 deletions

View File

@ -1297,16 +1297,16 @@
input: input:
dimmer_device: 40c14ccfe958d21d75888a968bbbf908 dimmer_device: 40c14ccfe958d21d75888a968bbbf908
on_short_action: on_short_action:
- service: input_boolean.toggle - data: {}
data: {}
target: target:
entity_id: input_boolean.tina_desk_lights entity_id: light.tina_desk_lights
action: light.turn_on
on_long_action: on_long_action:
- service: input_select.select_option - data:
data:
option: Reset option: Reset
target: target:
entity_id: input_select.tina_desk_scenes entity_id: input_select.tina_desk_scenes
action: input_select.select_option
off_short_action: [] off_short_action: []
off_long_action: [] off_long_action: []
- id: '1693174941627' - id: '1693174941627'
@ -1689,52 +1689,25 @@
alias: Tina Desk Lights Handler alias: Tina Desk Lights Handler
description: Handles turning on the desk lights with smart scene selection and also description: Handles turning on the desk lights with smart scene selection and also
turning them off turning them off
trigger: triggers:
- platform: state - entity_id: input_select.tina_desk_scenes
entity_id: input_boolean.tina_desk_lights
from: 'off'
to: 'on'
id: toggle-on
alias: Toggle On
- platform: state
entity_id: input_boolean.tina_desk_lights
from: 'on'
to: 'off'
id: toggle-off
alias: Toggle Off
- platform: state
entity_id: input_select.tina_desk_scenes
to: Reset to: Reset
id: reset id: reset
alias: Reset alias: Reset
- platform: state trigger: state
entity_id: light.tina_desk_lights - entity_id: binary_sensor.tina_desktop_on
from: 'on'
to: 'off'
id: lights-off
alias: Lights Off
- platform: state
entity_id: light.tina_desk_lights
from: 'off'
to: 'on'
id: lights-on
alias: Lights On
- platform: state
entity_id: binary_sensor.tina_desktop_on
from: 'off' from: 'off'
to: 'on' to: 'on'
id: computer-on id: computer-on
alias: Computer On alias: Computer On
condition: [] trigger: state
action: conditions: []
actions:
- alias: Reset - alias: Reset
if: if:
- alias: Triggered by Toggle On, Reset, or Computer On - alias: Triggered by Reset or Computer On
condition: or condition: or
conditions: conditions:
- condition: trigger
id: toggle-on
alias: Toggle On
- condition: trigger - condition: trigger
id: reset id: reset
alias: Reset alias: Reset
@ -1742,52 +1715,12 @@
id: computer-on id: computer-on
alias: Computer On alias: Computer On
then: then:
- service: input_select.select_option - target:
target:
entity_id: input_select.tina_desk_scenes entity_id: input_select.tina_desk_scenes
data: data:
option: '{{ states(''sensor.tina_desk_scene'') }}' option: '{{ states(''sensor.tina_desk_scene'') }}'
alias: Reset to appropriate default scene alias: Reset to appropriate default scene
- if: action: input_select.select_option
- condition: trigger
id: toggle-off
then:
- service: light.turn_off
target:
entity_id: light.tina_desk_lights
data: {}
alias: Toggle Off
- if:
- condition: trigger
id: lights-off
then:
- if:
- condition: state
entity_id: input_boolean.tina_desk_lights
state: 'on'
then:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.tina_desk_lights
data: {}
alias: Lights Off
- if:
- condition: trigger
id: lights-on
then:
- if:
- condition: state
entity_id: input_boolean.tina_desk_lights
state: 'off'
then:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.tina_desk_lights
data: {}
- delay:
seconds: 2
alias: Prevent script from re-triggering when boolean is turned on
alias: Lights On
mode: single mode: single
- id: '1696286403914' - id: '1696286403914'
alias: Basement Lights Handling alias: Basement Lights Handling

View File

@ -32,9 +32,6 @@ input_boolean:
give_me_darkness: give_me_darkness:
name: Give Me Darkness name: Give Me Darkness
icon: mdi:weather-night icon: mdi:weather-night
tina_desk_lights:
name: Tina Desk Lights
icon: mdi:desk
holiday_mode_hold: holiday_mode_hold:
name: Holiday Mode Hold name: Holiday Mode Hold
icon: mdi:party-popper icon: mdi:party-popper

View File

@ -868,9 +868,7 @@ script:
- front_porch - front_porch
- living_room - living_room
- mud_room - mud_room
- service: input_boolean.turn_on - tina_desk
target:
entity_id: input_boolean.tina_desk_lights
- delay: - delay:
hours: 0 hours: 0
minutes: 0 minutes: 0
@ -928,9 +926,7 @@ script:
area_id: area_id:
- living_room - living_room
- mud_room - mud_room
- service: input_boolean.turn_on - tina_desk
target:
entity_id: input_boolean.tina_desk_lights
- delay: - delay:
hours: 0 hours: 0
minutes: 0 minutes: 0

View File

@ -86,18 +86,14 @@ kallen_timer_cancel:
global_off: global_off:
alias: Global Off alias: Global Off
sequence: sequence:
- service: light.turn_off - data: {}
data: {}
target: target:
entity_id: all entity_id: all
- service: fan.turn_off action: light.turn_off
data: {} - data: {}
target: target:
entity_id: all entity_id: all
- service: input_boolean.turn_off action: fan.turn_off
data: {}
target:
entity_id: input_boolean.tina_desk_lights
mode: single mode: single
icon: mdi:earth-off icon: mdi:earth-off
global_on: global_on:
@ -111,40 +107,35 @@ global_on:
icon: mdi:earth icon: mdi:earth
max_brightness: max_brightness:
sequence: sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.tina_desk_lights
data: {}
alias: Turn on Tina Desk Lights
- alias: Turn off Adaptive Lighting and Motion Lighting - alias: Turn off Adaptive Lighting and Motion Lighting
service: switch.turn_off
data: {} data: {}
target: target:
label_id: label_id:
- adaptive_lighting - adaptive_lighting
- motion_lighting - motion_lighting
action: switch.turn_off
- delay: - delay:
hours: 0 hours: 0
minutes: 0 minutes: 0
seconds: 1 seconds: 1
milliseconds: 0 milliseconds: 0
- alias: Cancel motion timers - alias: Cancel motion timers
service: timer.cancel
data: {} data: {}
target: target:
label_id: motion_lighting label_id: motion_lighting
- service: input_boolean.turn_off action: timer.cancel
data: {} - data: {}
target: target:
entity_id: input_boolean.front_porch_light_on entity_id: input_boolean.front_porch_light_on
alias: Turn off Front Porch automation alias: Turn off Front Porch automation
- service: light.turn_on action: input_boolean.turn_off
data: - data:
kelvin: 5000 kelvin: 5000
brightness_pct: 100 brightness_pct: 100
target: target:
entity_id: all entity_id: all
alias: Turn on ALL LIGHTS to maximum brightness alias: Turn on ALL LIGHTS to maximum brightness
action: light.turn_on
mode: single mode: single
alias: Max Brightness alias: Max Brightness
icon: mdi:brightness-7 icon: mdi:brightness-7
@ -1008,39 +999,35 @@ adaptive_on_second_floor:
bright_on_first_floor: bright_on_first_floor:
alias: Bright on First Floor alias: Bright on First Floor
sequence: sequence:
- service: light.turn_on - target:
target:
entity_id: entity_id:
- light.living_room_lights - light.living_room_lights
- light.downstairs_bathroom_lights - light.downstairs_bathroom_lights
- light.mud_room_overhead - light.mud_room_overhead
data: {} data: {}
- service: input_boolean.turn_on action: light.turn_on
target:
entity_id: input_boolean.tina_desk_lights
data: {}
- delay: - delay:
seconds: 1 seconds: 1
- service: input_select.select_option - target:
target:
entity_id: entity_id:
- input_select.living_room_scenes - input_select.living_room_scenes
- input_select.downstairs_bathroom_scenes - input_select.downstairs_bathroom_scenes
- input_select.mud_room_scenes - input_select.mud_room_scenes
data: data:
option: Bright option: Bright
- service: light.turn_on action: input_select.select_option
target: - target:
entity_id: entity_id:
- light.tina_lamp - light.tina_lamp
data: data:
color_temp_kelvin: 2700 color_temp_kelvin: 2700
- service: light.turn_on action: light.turn_on
target: - target:
entity_id: entity_id:
- light.tina_lamp - light.tina_lamp
data: data:
brightness: 255 brightness: 255
action: light.turn_on
bright_on_second_floor: bright_on_second_floor:
alias: Bright on Second Floor alias: Bright on Second Floor
sequence: sequence:
@ -1138,11 +1125,11 @@ evening_on_first_floor:
entity_id: person.christina_stork entity_id: person.christina_stork
state: home state: home
then: then:
- service: input_select.select_option - target:
target:
entity_id: input_select.tina_desk_scenes entity_id: input_select.tina_desk_scenes
data: data:
option: Night Mode option: Night Mode
action: input_select.select_option
alias: If Tina is home, turn on desk lights alias: If Tina is home, turn on desk lights
- alias: Check if script is being called by Give Me Darkness automation - alias: Check if script is being called by Give Me Darkness automation
if: if:
@ -1156,40 +1143,40 @@ evening_on_first_floor:
entity_id: timer.mud_room_motion_timer entity_id: timer.mud_room_motion_timer
state: idle state: idle
then: then:
- service: light.turn_on - metadata: {}
metadata: {}
data: {} data: {}
target: target:
entity_id: light.mud_room_overhead entity_id: light.mud_room_overhead
- service: input_select.select_option action: light.turn_on
target: - target:
entity_id: entity_id:
- input_select.mud_room_scenes - input_select.mud_room_scenes
data: data:
option: Nightlight option: Nightlight
action: input_select.select_option
else: else:
- service: light.turn_off - target:
target:
entity_id: entity_id:
- light.living_room_lights - light.living_room_lights
data: {} data: {}
action: light.turn_off
- alias: Set mud room light to nightlight - alias: Set mud room light to nightlight
if: if:
- condition: state - condition: state
entity_id: timer.mud_room_motion_timer entity_id: timer.mud_room_motion_timer
state: idle state: idle
then: then:
- service: light.turn_on - metadata: {}
metadata: {}
data: {} data: {}
target: target:
entity_id: light.mud_room_overhead entity_id: light.mud_room_overhead
- service: input_select.select_option action: light.turn_on
target: - target:
entity_id: entity_id:
- input_select.mud_room_scenes - input_select.mud_room_scenes
data: data:
option: Nightlight option: Nightlight
action: input_select.select_option
alias: Give Me Darkness on alias: Give Me Darkness on
- conditions: - conditions:
- condition: state - condition: state
@ -1202,69 +1189,65 @@ evening_on_first_floor:
value_template: '{{ sunset_lights == 1 }}' value_template: '{{ sunset_lights == 1 }}'
alias: If sunset_lights = 1 alias: If sunset_lights = 1
then: then:
- service: light.turn_on - target:
target:
entity_id: entity_id:
- light.living_room_lights - light.living_room_lights
- light.mud_room_overhead - light.mud_room_overhead
data: {} data: {}
- service: input_select.select_option action: light.turn_on
target: - target:
entity_id: entity_id:
- input_select.living_room_scenes - input_select.living_room_scenes
data: data:
option: Adaptive option: Adaptive
action: input_select.select_option
- alias: Set mud room light to nightlight - alias: Set mud room light to nightlight
if: if:
- condition: state - condition: state
entity_id: timer.mud_room_motion_timer entity_id: timer.mud_room_motion_timer
state: idle state: idle
then: then:
- service: light.turn_on - metadata: {}
metadata: {}
data: {} data: {}
target: target:
entity_id: light.mud_room_overhead entity_id: light.mud_room_overhead
- service: input_select.select_option action: light.turn_on
target: - target:
entity_id: entity_id:
- input_select.mud_room_scenes - input_select.mud_room_scenes
data: data:
option: Nightlight option: Nightlight
action: input_select.select_option
else: else:
- service: input_boolean.turn_off - target:
target:
entity_id: input_boolean.tina_desk_lights
data: {}
- service: light.turn_on
target:
entity_id: entity_id:
- light.living_room_lights - light.living_room_lights
- light.mud_room_overhead - light.mud_room_overhead
data: {} data: {}
- service: input_select.select_option action: light.turn_on
target: - target:
entity_id: entity_id:
- input_select.living_room_scenes - input_select.living_room_scenes
data: data:
option: Adaptive option: Adaptive
action: input_select.select_option
- alias: Set mud room light to nightlight - alias: Set mud room light to nightlight
if: if:
- condition: state - condition: state
entity_id: timer.mud_room_motion_timer entity_id: timer.mud_room_motion_timer
state: idle state: idle
then: then:
- service: light.turn_on - metadata: {}
metadata: {}
data: {} data: {}
target: target:
entity_id: light.mud_room_overhead entity_id: light.mud_room_overhead
- service: input_select.select_option action: light.turn_on
target: - target:
entity_id: entity_id:
- input_select.mud_room_scenes - input_select.mud_room_scenes
data: data:
option: Nightlight option: Nightlight
action: input_select.select_option
alias: Give Me Darkness off alias: Give Me Darkness off
evening_on_second_floor: evening_on_second_floor:
alias: Evening on Second Floor alias: Evening on Second Floor