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)?
Hi. I am new to Home Assistant and would like to use this blueprint in an automation. Unfortunately it does not work for me. Any guidance what I could have done wrong is appreciated.
Let me share some details on what I have done in the latest version of HA.
I created a zone which I am currently in with multiple IOS based devices.All tested devices do show up in this zone with device_tracker.device_name entity.
Created automation from blueprint with trigger āzoneā that I am currently in. Zone condition set to āInside Zoneā. Tracking mode set to āDevicesā. Devices to Track set to my IOS Device (differen iPhones and an iPad). Only one device at a time. Min. Required set to 1.
Presence Helper enabled and set.
Manually executed the automation.
Now the part which I currently do not understand: Toggle helper will never change to āOnā. Trace always shows āresult: falseā and with this " Parallel actions to turn off".
I currently have no clue what goes wrong. Any hints for me. Thanks.
Maybe I found the issue causing it.
I named the zone like the city I am currently in. I.e. āHamburgā or āMunichā. The entity-idās created will then be named āzone.hamburgā or āzone.munichā.
The script the tries to compare Hamburg eq hamburg or Munich eq munich which will always fail.
As soon as I rename the zone names all to lowercase characters the automation works as expected.
Looks to me, like an ignore upper-/lowercase function is missing wen comparing it.
Can someone confirm my finding. Thanks.
Of course I selected the zone in Zone to Monitor. To manually execute the script I just hit ārun actionā to see if my helper changes.
Meanwhile I changed the code in my sripts to āselectattr(āstateā, āsearchā, zone_name, ignorecase=true)ā (also rejectattr(ā¦)) , which seems to work for me.
I am testing this automation and iām running in an issue.
I use this automation to track when nobody is home. If so, i want to run some actions. I only want to run these actions once. This automation however trigges multiple times, specifically when one of the persons iām tracking is passing by other zones.