I have IKEA motion sensor and IKEA light bulb.
They are connected to HA via zigbee2mqtt.
They work fine 90% of the time.
But sometimes the light doesn’t turn off.
In HA
- the motion sensor is: Clear
- the automation is triggered
- the action to turn off the light is triggered
- the toggle in HA for the light is off
but the light is still ON.
I have 3 automations:
1 for full brightness trough the day,
1 for minimum brightness trough the night,
1 to turn off the light when no motion is detected
- id: '1562703219505'
alias: Entrance - Light off when no Motion for 1min
trigger:
- entity_id: binary_sensor.motion_sensor
from: 'on'
platform: state
to: 'off'
condition: []
action:
- data:
entity_id: light.entrance_light
service: light.turn_off
- id: '1562706887884'
alias: Entrance - Motion after 05:00
trigger:
- entity_id: binary_sensor.motion_sensor
from: 'off'
platform: state
to: 'on'
condition:
- after: 05:00
before: '22:30'
condition: time
action:
- data:
brightness: 255
entity_id: light.entrance_light
service: light.turn_on
- id: '1562707484935'
alias: Entrance - Motion after 22:30
trigger:
- entity_id: binary_sensor.motion_sensor
from: 'off'
platform: state
to: 'on'
condition:
- after: '22:30'
before: 05:00
condition: time
action:
- data:
brightness: 5
entity_id: light.entrance_light
transition: 1
service: light.turn_on