Philips Hue Motion Sensor + Philips Hue Bulb Automation

Hi,

I have a Philips Hue Motion Sensor and a Philips Hue bulb that I’m trying to create an automation where if it’s after sunset and motion is detected it turns on the Philips Hue bulb.

Pretty simple, I believe I’ve done the automation correctly but it just doesn’t work. There is a default automation in Home Assistant but likewise just doesn’t work.

Hoping someone has an easy fix?

alias: Car Port Light Motion Automation
description: ""
trigger:
  - type: motion
    platform: device
    device_id: xxxxx
    entity_id: binary_sensor.philips_sml001_motion
    domain: binary_sensor
condition:
  - condition: sun
    before: sunrise
    after: sunset
action:
  - type: turn_on
    device_id: xxxxxx
    entity_id: light.philips_lca001_huelight
    domain: light
    brightness_pct: 100
  - delay:
      hours: 0
      minutes: 2
      seconds: 0
      milliseconds: 0
  - type: turn_off
    device_id: xxxxxxx
    entity_id: light.philips_lca001_huelight
    domain: light
mode: single

Your automation will always turn off the light after 2min, regardless if movement stills or not.

When you say it’s not working, what that means? It doesn’t turn on, or it turns on, but not off? Give a bit more details.

Check your traces!
Is the automation executed at all and where does it stop?

As action I would use the “service” light.turn_on

You can also try some Blueprint developed by the community. This one is just an example of one quite complete (should cover your case) and with active maintenance: 💡 Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights