I’m struggling with making a automation for my Hive motion sensor. What I want to do is:
Trigger: Motion detected
condition: between sunset-10pm
action: turn on light for 2 minutes. brightness 50%
condition: between 10pm-6am
action: turn on light for 1 minute. brightness 10%
At the moment I start basic and just want to get the light to turn on to a certain brightness.
Yes the automation is on and yes the entity ID is correct.
I think you may be right in that the state change isn’t right, I’m having difficulty seeing exactly what that is. I’ve seen on, off, clear and detected but not sure what I need to use.
I chose 50 as a random number that wasn’t full brightness. but thanks for the heads up on the percentage value
Binary sensors can only be on or off. What’s displayed in the frontend is a “friendly name” for the actual state based on the device class.
Double-check in Developer Tools > States that the state of the motion sensor changes when you walk in front of it though. Perhaps the sensor isn’t responding.
Yep, most motion sensors report a state of on for a varying length of time (depends on the sensor) after motion is detected. It should go back to off soon after motion stops being detected.
Also note the sensor has to change from any other state to on in order for the first automation to trigger. So if it’s already reporting a state of on when you walk in front of it, the automation won’t trigger.
I don’t think it’s randomly. I just read that the Hive motion sensor will change to ‘on’ for 5 minutes after motion has been detected.
So let’s say you enter the room for the first time, the motion sensor changes from ‘off’ to ‘on’, your first automation will trigger and the light turns on.
Now 1 minute later you leave the room, and 2 minutes later you enter the room again. The motion sensor is still ‘on’, so your first automation to turn off the lights will not trigger and therefore your lights will still be on. The motion sensor delay of 5 minutes will be reset.
The light will turn off 7 minutes (5 minutes the motion sensor stays ‘on’ + 2 minutes delay in your automation) after the last motion has been detected.
Then probably the Hive motion sensor is not pushing state changes to home assistant, but home assistant is polling the status of the motion sensor.
If it is like this, then your motion sensor is useless, because the new state will only be polled from the sensor at a certain interval of maybe 1-2 minutes.
If you’re in the US (which I’m guessing you are since Hive is a US company), I’ve had a good experience with Wyze Sense. The starter kit is $20 + shipping and includes two contact sensors, a motion sensor, and the bridge. There’s a custom component for it that allows you to plug the bridge into whatever hardware you’re using for Home Assistant and communicate with the sensors that way. This means total local access, no Internet required. As a result, the states update immediately in Home Assistant.
Additional contact sensors are 4 for $20, and additional motion sensors are $6 each.