Use event fired by Node-RED as trigger for Xmas lights

This commit is contained in:
2023-12-20 17:06:50 -05:00
parent 2c598b254f
commit 0869a4a827

View File

@ -4206,32 +4206,27 @@
alias: Christmas Tree
description: ''
trigger:
- platform: event
event_type: timer.finished
- alias: Toggle on
platform: event
event_type: extraLights
event_data:
entity_id: timer.sunset_lighting_timer
alias: When sunset lights timer is finished
id: timer-finished
- alias: At sunrise
platform: state
entity_id:
- sun.sun
id: sunrise
from: below_horizon
to: above_horizon
for:
hours: 0
minutes: 0
seconds: 0
toggle: 'on'
id: toggle-on
- platform: event
event_type: extraLights
event_data:
toggle: 'off'
id: toggle-off
alias: Toggle off
condition: []
action:
- alias: Processing
choose:
- conditions:
- condition: trigger
- alias: Toggle on
condition: trigger
id:
- timer-finished
alias: Timer finished
- toggle-on
sequence:
- alias: Turn on Christmas lights
service: light.turn_on
@ -4241,10 +4236,10 @@
- light.christmas_lights_front_window
data: {}
- conditions:
- condition: trigger
- alias: Toggle off
condition: trigger
id:
- sunrise
alias: Sunrise
- toggle-off
sequence:
- alias: Turn off Christmas tree
service: light.turn_off