Combine Hue motion sensor with a HA binary sensor

Hi, I currently use a Hue motion sensor to trigger the hallway lighting. Would it be possible to also use a binary sensor within HA to trigger the lights on? I think it would be fairly easy, but I’m unsure how it would work alongside the motion sensor. Has anyone experimented with this and figured out a good way to do it?

I have searched the forums, but I only see a lot about the motion sensor into HA rather than triggering motion from HA. To clarify, I have another PIR sensor that shows up in HA as a binary sensor, so I’d like for them to both work on the same set of lights.

Hi, @Kallb123 - each of my Hue motion sensors show up as binary_sensor. This is the screen shot from the develop/states panel:


Here’s how I use them to trigger an action:

- alias: Motion sensor state change actions
  trigger:
  - entity_id:
    - binary_sensor.back_porch_sensor_motion
    - binary_sensor.laundry_room_sensor_motion
    from: 'off'
    to: 'on'
    platform: state
  - entity_id:
    - binary_sensor.back_porch_sensor_motion
    - binary_sensor.laundry_room_sensor_motion
    from: 'on'
    to: 'off'
    platform: state

Any other binarysensorwill work the same way - this shows that it will trigger when it goes fromontooff(first trigger) and when it goes fromontooff. You can add as many triggers as want - they act like or` statements - it only takes one of them to trigger the actions.

Is this what you’re looking for?

Thanks for the input! I currently have the motion sensor set up via the Hue app, so it’s all native that end. But then I have a PIR sensor that will need to be integrated via HA. So I can trigger an automation on the PIR binary sensor, but would action would I take and how best to not interfere with the Hue set up as well?

You can do this by simply adding it to the automation for the trigger - it’s just another way to trigger the existing automation. It won’t interfere with the Hue setup - it just adds to it. Having said that, I’m assuming you have the Hue motion sensor and the PIR sensor in the same area, and want to trigger the same actions if either triggers. Is that a correct assumption? If it is correct, then what I provided will work:

With this setup, the automation will trigger whenever either binary_sensor triggers. Does that make sense? If I’m missing the point, don’t hesitate to tell me :wink:

If this is off the mark, then post your existing automation and we’ll go from there.

The thing I might now have clarified is that the current motion system is purely within the Hue app. So there’s no existing automation within HA. I would like the new PIR to work via HA. I assume I can just toggle the light on for a certain amount of time, but I wasn’t sure if there’s any other better way to maybe trigger a motion even within the Hue API from HA. For example, maybe a binary sensor cm trigger could start a Hue service that tells it there’s motion in an area. If there’s no way to do it via the Hue system though, I’ll just have to manage the “light on for 30 seconds” within HA.