Move living room night lighting to Node-RED

tm24fan8/HA-NerdFlows#18
This commit is contained in:
2024-01-15 17:17:11 -05:00
parent 4fc7e16c8b
commit de765852bb

View File

@ -1792,90 +1792,6 @@
entity_id: alarm_control_panel.alexa_guard_9ee3b
data: {}
mode: restart
- id: '1696286103061'
alias: Living Room Night Lighting
description: Provide lighting in case anyone needs to go downstairs in the middle
of the night.
trigger:
- platform: state
entity_id: binary_sensor.living_room_motion
from: 'off'
to: 'on'
id: motion-on
- platform: state
entity_id: binary_sensor.living_room_motion
from: 'on'
to: 'off'
id: motion-off
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.living_room_motion_timer
id: timer-finished
condition:
- condition: state
entity_id: binary_sensor.people_present
state: 'on'
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
action:
- choose:
- conditions:
- condition: template
value_template: '{{ (trigger.id == ''motion-on'' and is_state(''input_boolean.night_mode'',''on''))
and (is_state(''input_boolean.kallen_sleeping'',''on'') or is_state(''input_boolean.kallen_overnight'',''on''))
}}'
alias: Motion On
sequence:
- service: timer.cancel
target:
entity_id: timer.living_room_motion_timer
data: {}
- service: light.turn_on
target:
entity_id: light.first_floor_lights
data: {}
- service: input_select.select_option
target:
entity_id:
- input_select.living_room_scenes
- input_select.tina_lamp_scenes
- input_select.mud_room_scenes
- input_select.downstairs_bathroom_scenes
- input_select.dining_room_lamp_scenes
data:
option: Adaptive
- conditions:
- condition: template
value_template: '{{ (trigger.id == ''motion-off'' and is_state(''input_boolean.night_mode'',''on''))
and (is_state(''input_boolean.kallen_sleeping'',''on'') or is_state(''input_boolean.kallen_overnight'',''on''))
}}'
alias: Motion Off
sequence:
- service: timer.start
target:
entity_id: timer.living_room_motion_timer
data:
duration: '{% from ''time.jinja'' import timer_duration %} {{ timer_duration(''input_number.living_room_lights_off_delay'')
}}
'
- conditions:
- condition: trigger
id: timer-finished
alias: Timer Finished
sequence:
- service: light.turn_off
target:
entity_id:
- light.living_room_lights
- light.tina_desk_lights
- light.mud_room_overhead
- light.downstairs_bathroom_lights
- light.dining_room_lamp
data: {}
mode: restart
- id: '1696286192013'
alias: Tina Desk Lights Handler
description: Handles turning on the desk lights with smart scene selection and also