Good morning,
I would like to illuminate the steps of the staircase based on two proximity sensors (initial tests are with input boolean simulating PIRs), for this I am relying on the integration of WLED.
I know WLED has a usermod for this, but it doesn’t offer the ability to run multiple effects in each step.
The configuration shown below works fine the first time it runs, from that moment on it can be said that it works but it only runs the last effect until I restart the controller where WLED runs (wemos D1 mini).
Do you know what could cause this?
I have created the following automation:
- alias: "Segment effects up based on PIR sensor"
trigger:
- platform: state
entity_id: input_boolean.bottom_pir
to: 'on'
condition:
- condition: state
entity_id: input_boolean.top_pir
state: 'off'
action:
- service: script.turn_on
entity_id: script.segment_effects_bottom
- alias: "Segment effects down based on PIR sensor"
trigger:
- platform: state
entity_id: input_boolean.top_pir
to: 'on'
condition:
- condition: state
entity_id: input_boolean.bottom_pir
state: 'off'
action:
- service: script.turn_on
entity_id: script.segment_effects_top
And these are the scripts that are called from the automation
segment_effects_bottom:
sequence:
- service: light.turn_on
entity_id: light.wled_segment_1
data:
effect: "dual_scan"
transition: 2
- delay:
seconds: 2
- service: light.turn_on
entity_id: light.wled_segment_1
data:
effect: "solid"
transition: 1
- delay:
seconds: 1
- service: light.turn_on
entity_id: light.wled_segment_2
data:
effect: "dual_scan"
transition: 2
- delay:
seconds: 2
- service: light.turn_on
entity_id: light.wled_segment_2
data:
effect: "solid"
transition: 1
- delay:
seconds: 1
- service: light.turn_on
entity_id: light.wled_segment_3
data:
effect: "dual_scan"
transition: 2
- delay:
seconds: 2
- service: light.turn_on
entity_id: light.wled_segment_3
data:
effect: "solid"
transition: 1
- delay:
seconds: 1
- service: light.turn_on
entity_id: light.wled_segment_4
data:
effect: "dual_scan"
transition: 2
- delay:
seconds: 2
- service: light.turn_on
entity_id: light.wled_segment_4
data:
effect: "solid"
transition: 1
- delay:
seconds: 1
- delay:
seconds: 5
- service: light.turn_off
entity_id: light.group_lights
segment_effects_top:
sequence:
- service: light.turn_on
entity_id: light.wled_segment_4
data:
effect: "dual_scan"
transition: 2
- delay:
seconds: 2
- service: light.turn_on
entity_id: light.wled_segment_4
data:
effect: "solid"
transition: 1
- delay:
seconds: 1
- service: light.turn_on
entity_id: light.wled_segment_3
data:
effect: "dual_scan"
transition: 2
- delay:
seconds: 2
- service: light.turn_on
entity_id: light.wled_segment_3
data:
effect: "solid"
transition: 1
- delay:
seconds: 1
- service: light.turn_on
entity_id: light.wled_segment_2
data:
effect: "dual_scan"
transition: 2
- delay:
seconds: 2
- service: light.turn_on
entity_id: light.wled_segment_2
data:
effect: "solid"
transition: 1
- delay:
seconds: 1
- service: light.turn_on
entity_id: light.wled_segment_1
data:
effect: "dual_scan"
transition: 2
- delay:
seconds: 2
- service: light.turn_on
entity_id: light.wled_segment_1
data:
effect: "solid"
transition: 1
- delay:
seconds: 5
- service: light.turn_off
entity_id: light.group_lights