Hello All,
I’ve combined a small project including HA, EspHome, WS2812B Led strips and Aqara motion sensors to light my 14step stairs. Everything work good except lightning each step that is taking 1second. Cant make it like 400ms. Below is my code, I know it’s chaotic but it works.
My automation:
- id: '15857734476143'
alias: Sch_down
description: swiatła dół góra
trigger:
- entity_id: binary_sensor.0x00158d0004058359_occupancy
platform: state
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_boolean.notify_schody_up
state: 'off'
- condition: state
entity_id: input_boolean.notify_schody_down
state: 'off'
- condition: time
after: '19:00:00'
before: '07:00:00'
action:
- service: input_boolean.turn_on
data:
entity_id: input_boolean.notify_schody_down
- service: light.turn_on
entity_id: light.step14
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step13
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step12
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step11
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step10
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step9
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step8
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step7
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step6
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step5
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step4
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step3
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step2
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
- delay:
milliseconds: 100
- service: light.turn_on
entity_id: light.step1
data:
brightness: 60
rgb_color:
- 120
- 0
- 0
Congiguration on EspHome is making how many leds are on each step.