Thanks for the blueprint! I’m trying it out with my home and away automations.
Just thinking out loud, I’ve thought about asking if everyone is away on the home assistant voice before turning off lights or setting the AC in away mode. I have two children who don’t always bring their phone with them when we head out of the house. I could probably do something similar with mmWave but I don’t have any of those sensors yet.
@Blacky, quick question, for the people and device state triggers, should they trigger on attribute change as well as state change. I noticed the automation was triggering a lot even though everyone was home all day due to minor changes in gps coordinates.
Current Triggers:
- trigger: state
id: t0
entity_id: !input people
- trigger: state
id: t1
entity_id: !input devices
What I would expect to prevent triggering on attribute change:
- trigger: state
id: t0
entity_id: !input people
to: null
- trigger: state
id: t1
entity_id: !input devices
to: null
Zone / Presence is tricky… it can work for some but not for all. You may be finding out it is not for you.
No, People and devices have a state for zone.
Some people like using persons but id if you just use a devices it better to understand as persons are always linked to a device.
Presence Helper Option
This is what you should use for all your automations.
Depending if your using Inside Zone or Outside Zone look at the delays. So say your using it to track Inside Zone This could trigger a light to come on when you arrive home but when you leave you will be outside the zone or you may have minor changes in gps coordinates. So your Delay Before Turning OFF is the buffer.
You may be using it in the sensor light bypass option 2. This will be Outside Zone. So when your outside the zone it will turn ON but you then use the Delay Before Turning ON so the lights stay ON untill your gone or you have minor changes in gps coordinates. Again the buffer. Dogs and cats wont trigger the motion sensor when your not home.
You could always increase your zone area but I recommend using the Presence Helper Option for your automation.
So, my home zone is working as expected. When people are home their device tracker and person are stable. But that does not stop updates to the GPS coordinates attribute associated with device tracker or person. My question is simply, if I’m Home, and my device tracker or person updates its attributes but the state still reads “home” and has not changed, should this automation trigger? If so, why? Happy to add more details and screenshots if I’m not explaining things well.
EDIT: I reread the above reply, sorry, I’m a bit under the weather today. It seems it should not trigger on attribute change. But it does. In my testing this seems to be due to the missing ‘to: null’ on the trigger, limiting the trigger to only state changes and not triggering on attribute changes.
Ah I thought it wasn’t working but your talking about the additional triggers. Yes we can add this to stop these from happening… nice one… thanks for doing the testing!
If you run the action it probably wont do anything because your home or away. What you need to do to test it is change the state of the people or device depending on what your using. To do this go into developer tools → states tab and look (search) for the people or device your using. Select it and then you can set the state to home, away or whatever your using. When you do this the blueprint will trigger automatically. If you have more than one device or people then depending on you settings you may have to change all of them.
Hi!
Firstly, thank you for this blueprint. I was busy setting up like a million different automations for my AC before I found this. You’re a life saver.
In case I sound like I have no idea what I’m doing, I literally just started using HA this past week so my knowledge on everything is basically 0, and I can barely read YAML
If I turn the presence helper on, does it automatically toggle the helper boolean (after the specified delays)?