Hi, im getting some strange issues while connecting a Hue Motion Sensor to ZHA.
I had an automation where lights should go on when motion is detected. After 20 seconds the light should turn brightness to 25% and after 40 seconds the light should turn off.
Within the time any motion would trigger the light to go up to 100% again.
It worked perfect when the motion sensor was connected to the hue bridge but now the lights wont turn off after dimming to 25%. My problem with hue bridge was the delay to turn on the lights.
Now the lights are turned on instantly but the only things that work are lights on and turning brightness to 25% after this the lights wont go to 100% again and the lights don’t turn off.
It stays at 25% brightness all the time.
Whats wrong with this?
This is my code:
- id: '1630145925001'
alias: Flur GUI
description: ''
trigger:
- platform: state
entity_id: binary_sensor.motion_flur_presenz
from: 'off'
to: 'on'
- platform: state
entity_id: binary_sensor.motion_flur_presenz
from: 'on'
to: 'off'
for: 00:00:20
- platform: state
entity_id: binary_sensor.motion_flur_presenz
from: 'on'
to: 'off'
for: 00:00:40
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.motion_flur_presenz
state: 'on'
- condition: state
entity_id: light.extended_color_light_1_2
state: 'off'
sequence:
- service: light.turn_on
target:
entity_id: light.extended_color_light_1_2
data:
brightness_pct: 100
- conditions:
- condition: state
entity_id: binary_sensor.motion_flur_presenz
state: 'off'
for: 00:00:20
- condition: state
entity_id: light.extended_color_light_1_2
state: 'on'
sequence:
- service: light.turn_on
target:
entity_id: light.extended_color_light_1_2
data:
brightness_pct: 25
- conditions:
- condition: state
entity_id: binary_sensor.motion_flur_presenz
state: 'off'
for: 00:00:40
- condition: state
entity_id: light.extended_color_light_1_2
state: 'on'
sequence:
- service: light.turn_off
target:
entity_id: light.extended_color_light_1_2
default: []
mode: restart