Not really sure what you are asking.
You could certainly use the additional conditions to limit only certain zone change or people, and you could leave the entering and leaving blank, and only populate the leave and enter.
Read thru the documentation again and try some things.
The thing is that if you are counting on a jump from school to home, there canāt be any not_home between.
If you canāt use the BP direct, you could take pieces and parts of the BP and build your own automation.
You are going to have to look at the trace to see what is happening and the zones to see what itās state is.
Generally home is home, though, myHome, not sure what that is. If it is a zone you set to overlay the actual home, weird things can happen.
Sorry, my fault, my text about the zone āmyHomeā is a little bit confusing.
I have only one zone defined which is my home address. I call it āmyHomeā in my last post. The name in HA is āhomeā (like āhomeā, not āHomeā or āhOmEā or something else).
I added now the following code to your BP:
trace:
stored_traces: 25
to have a little bit more traces to investigate in this.
Thanks for the hint. I will come back with my results.
It should go to the step under the arrow (i presume) .
Here is the step config which I struggle to find the problem:
My guess is there is something wrong in the conditions of āHas Person arrived at Zone?ā.
alias: Determine if there was an actionable event
choose:
- conditions:
- alias: Has Person arrived at Zone?
condition: and
conditions:
- condition: template
alias: person is in target zone
value_template: '{{ to_state in friend_zone }}'
- condition: template
alias: person is arriving from another zone
value_template: '{{ not from_state in friend_zone }}'
sequence:
- service: notify.mobile_app_chmp
data:
message: '1 Test is at home'
- service: notify.notify
data:
message: 2 Test is at home
- type: turn_on
device_id: 90cb399ceaf3d1a46e27f844663093af
entity_id: 53ee8ba0aa12919497ef715291c5e82e
domain: light
brightness_pct: 100
- conditions:
- alias: Person left Zone?
condition: and
conditions:
- alias: Person was in Zone
condition: template
value_template: '{{ from_state in friend_zone }}'
- alias: Person not in zone now
condition: template
value_template: '{{ not to_state in friend_zone }}'
sequence: []
- conditions:
- alias: Person jumped from known zone to known zone
condition: and
conditions:
- alias: Person left known zone
condition: template
value_template: '{{ from_state in friend_zone }}'
- alias: Person arrived in known zone
condition: template
value_template: '{{ to_state in friend_zone }}'
sequence: []
The trace is saying that trigger is probably to and from the same zone. Hard to say without the words but that is the most likely.
You don;'t need to post it here, just look at it yourself, but in the trace click the top asterix and then changed variables on the right. there it will tell you the from_state for person and zone, and the to_state person and zone. If they match then there was no zone change so it wonāt pick āleft a zoneā, āentered a zoneā, or āleft and entered a zoneā in the decision tree at the bottom, which looks like the case.
There will be a trigger every few minutes where the GPS changes a few digits and the person doesnāt move far enough to change a zone. Those have to be screened out. Try to manually change te device location out of the zone and let it come back while testing.
This seems to be ok.
So this looks like its fulfilled but does not start the āHas Person arrived at Zone?ā step.
- alias: Has Person arrived at Zone?
condition: and
conditions:
- condition: template
alias: person is in target zone
value_template: '{{ to_state in friend_zone }}'
- condition: template
alias: person is arriving from another zone
value_template: '{{ not from_state in friend_zone }}'
I just wrote this up to help here and anywhere else when working with zones.
It might or might not help you @chris345433 but it should help others.
I realized the docs were a bit weak on this and in reading about 4 forum posts, I finally figured out how to do it myself, so I decided it should be pulled into a guide.
NEW UPDATE
All I did was change the default for the zone2monitor. No actual code changes.
However if you have a huge list of zones and are frustrated by having to edit your automation to add another zone when you add one to your HA install, this new template will just grab every zone you have and make it available for the BP to monitor and it updates itselfā¦
This is the template:
'{{ states.zone | map(attribute="entity_id") | list }}'
Changelog
**2024-01-24**: Changed zones default to auto-list all zones.
She was afflicted with Muscular Dystrophy all her life, and wasnāt able to go anywhere on her own any more.
A week ago at the age of 41 she lost her battle with her disease and I only track her phone now, not her.
Be careful when you snap judge like that, you donāt know when you are going to make someone cryā¦
@Sir_Goodenough - First and foremost iām sorry for your loss and for the trolls in this thread. Iām sure she felt loved and got joy at you geeking out with home automation to make life a little bit better. I know my loved ones do.
Secondly thank you for this great automation bluepint and the support you have provided over the year.
Third, if you are up for it, might I impose on some of that tech support? Running into a weird issue - where the phone/app randomly freak out and think they are at multiple locations, which triggers this blueprint repeatedly (Home, school, home, school, home school), IOS GPS troubles aside i was curious if there is a way to add a ātrigger delayā - something that says āwait N seconds after person location is updated, and confirm they are still there before triggeringā. Couldnāt tell based on the description of hold_period if this was the correct option or not.