Home assistant motion triggered lights automatic override

Hello!

I have used Philips Hue lights for a long time and their simple automation has been enough. I bought some led strips from TP-link and needed more control over my home automation. That’s why I moved to Home Assistant. I have a few Philips Hue lights and TP-link strips that I want to control on my Kitchen via Hue Motion sensor.

I used this Blueprint from Networkingcat which works fine: YAMA - Yet Another Motion Automation (Scenes, Ambient Light and some Conditions ) The set upped automation changes kitchen lights color to white when motion is detected.

I also have Google Home in the kitchen which I usually use to change lights color, turn them on / off etc. After changing the lights on Google Home → The Home Assistant automation triggers motion and overrides the change. So it changes everything back to white.

This is silly, as the Hues normal automation is smart enough and doesn’t trigger motion change when I have changed lights color via Google Home. I made some googling and found that I should somehow make manual overrides to the lights (Motion-controlled light with manual override) but how to implement this when changing lights color and brightness via Google Home?

That’s the difference of HA: it can do a lot more but does exactly what you tell it to, and you told it to change the lights any time motion is detected. It’s silly to assume otherwise, and would make HA a lot worse if it started making hidden changes in the background.

You’re gonna have to tell it when to ignore the automation, and the blueprint you’re using provides multiple ways to do so, you just need to set a boolean to signify when it should be followed. The setting will depend on your use cases.

The easiest way would be to tell Google Assistant to update the boolean when it updates the lights, but I’m unsure if GA supports something like that. Otherwise, you might have to get creative with some logic in HA, since it sounds like you leave the lights on all the time and only want motion to update them when they are in certain states.

1 Like

The start of your HA journey sounds a bit like mine… I was frustrated with not being able to have a hue motion sensor trigger actions in Lutron and TP-link devices, so I found HA and down the rabbit hole I went.

The hard part here is detecting the conditions under which you don’t want the motion automation to run. The blueprint you’re using has an optional no_motion_blocker input that looks like it’ll do what you want. The tricky part is deciding when to turn that blocker on or off.

You could set up an input_boolean that’s exposed to Google so you could say “Hey Google, turn off motion detection in the kitchen” or something like that before using Google to change the color of your lights.

Alternatively, you could set the blocker by triggering on a color change of the lights or lights turning on without the motion automation being recently triggered.

In either case, you’d then need to decide what conditions would cause the motion automation to turn back on.

Also, one tip for using Google/Alexa: both services allow you to connect devices (Hue, TP-Link, Lutron, etc) directly to them. And Home Assistant can also control them. Don’t do both. Have a single source for each device or you’ll end up with a mess. I also use Google Assistant, and I have all my devices connected to Home Assistant only. Then I integrate Home Assistant with Google and expose the entities I want Google to see.

1 Like