Since I updated from 0.85.1 tot 0.86.4 this automation does not work anymore as intended:
- id: turn_on_kitchen_lights_on_motion
alias: Turn on the kitchen lights on motion
trigger:
platform: state
entity_id: binary_sensor.hue_motion_sensor_motion_keuken
to: 'on'
condition:
condition: numeric_state
entity_id: sensor.keuken_lux
below: '12'
action:
service: light.turn_on
entity_id: light.aanrecht
- id: turn_off_kitchen_lights_after_5min
alias: Turn the kitchen lights off 5 min after last motion
trigger:
platform: state
entity_id: binary_sensor.hue_motion_sensor_motion_keuken
to: 'off'
for:
minutes: 5
action:
service: light.turn_off
entity_id: light.aanrecht
The light will turn on. but never off.
If I manually trigger the ‘Turn the kitchen lights off 5 min after last motion’ it works, but I’t won’t trigger at the 5 minutes past last motion.
Strange thing is, before the update this worked flawlessly.
I’m puzzled by this problem. I have one idea why it may not work. However, it’s only based on a wild guess, and is only a remote possibility, so don’t get your hopes up!
Are you using the same kind of motion sensor (Philips Hue) in your system and in your parents’ system? If the sensors are the same then I don’t know why it fails to work. However, if the sensors are different, perhaps the automation is failing because something has changed in the Hue sensor’s operation between versions 0.85.1 and 0.86.4. There have been several recent changes to the Hue component.
try putting this in for the second automation then reload your automations:
- id: turn_off_kitchen_lights_after_5min
alias: Turn the kitchen lights off 5 min after last motion
initial_state: 'on'
trigger:
platform: state
entity_id: binary_sensor.hue_motion_sensor_motion_keuken
to: 'off'
for:
minutes: 5
action:
service: light.turn_off
entity_id: light.aanrecht
Otherwise everything looks OK. Especially if it worked before.