🌐 Zone Notification Extended

please look at the screenshot at the bottom → Quelle/Source: GPS - you have to look at the entity which you have connected to the person


Now everything is fine running. My problem was: I chose the wrong for tracking my GPS. (My telephone has two devices, called device tracker. One is for GPS tracking and the other tracks only the network connection (yes/no)). After I connected the correct GPS device tracker with the person, everything works fine.

I’m getting a condition error that i'm not understand what condition is in error:

condition: template
value_template: ‘{{ trigger.to_state.state != trigger.from_state.state }}’

Trace logs

That’s no error. The condition blocks the automation. It checks if the the new state is equal to the old state. That means if the new zone is equal to the old one. If it’s the case the automation action won’t be executed.

How would I fix it?

There is nothing to fix. If the state of a person gets an update the automation will be triggered. But it makes not sense if the zone you’re coming from is the same you’ve technically entered.

E.g. it’s possible to update the state of a person from home to away to, let’s say, playground. In this cases the action will be executed.

But if person leaves home and enters home without being away it makes no sense to trigger the automation because he/she never left home.

So if the entering zone is the same like the leaving zone the automation blocks the action.

How can I set up that the automation fires only then the person enters the zone from outside? From not_home to home or defined zone would help, also.

I have a zone around my home zone and sometimes the person is switching between the home zone and the lager zone around (same center).

You could setup a custom template condition for entering like:

{{ zone_from != state_attr('zone.your_outside_zone','friendly_name') and zone_to != state_attr('zone.home','friendly_name')}}
1 Like

Thanks for the fast reply. I will give it a try.

It still fires even I came from home to the zone surrounding home.
Did I messed something up?

custom_conditions:
      - condition: time
        after: "08:00:00"
        before: "21:00:00"
      - condition: template
        value_template: >-
          {{ zone_from != state_attr('zone.home','W-Dorf') and zone_to !=
          state_attr('zone.w_dorf_3km','W-Dorf+3,5km') }}

{{ zone_from != state_attr('zone.home','friendly_name') and zone_to != state_attr('zone.w_dorf_3km','friendly_name') }}

1 Like

So the friendly name should not be the real friendly name?

Nope, state_attr('zone.w_dorf_3km','friendly_name') → this method takes the entity zone.w_dorf_3km and extracts the friendly name. The variables zone_from and zone_to store the friendly_names of the zone you’ve came from or you’ve entered.

You compare the arriving/leaving zone friendly names with the friendly name of your home or zone.w_dorf_3km.

1 Like

Ok, why is this condition true?

Hi, thank you so much for such an awesome blueprint. It’s been working great for my purposes. I just read through this thread and can see a lot of improvements have happened over the last year, and much of my experience has been on the finely tuned current version.

My inquiry: having been learning notifications recently on a project to have an alert related to a timer for our hot tub cover being left open after sanitization I learned about “tags” as an option on notifications. The idea being so that a subsequent notification can replace a previous notification.

I was wondering if there is a way to set a tag that I have overlooked, or if it’s possible to expose the tag option in a future version of the blueprint.

Much gratitude to you.

1 Like

Hi, thanks for your feedback. Just checkout the latest version. I’ve added the tag option. You can also use variables like person or zone to the tag to display the recent activities of a person or a zone.

1 Like

Awesome, you’re welcome and thank you! I’ll check it out. Tag = person is exactly what I was thinking.

I like your overwhelming blueprint!
I appreciate any help on my maybe special use case.

I just want to get a notification if a person enters the zone, which surrounds the home zone, from outside.

I need this to get announcements to have all dogs in the house because the driveway gate will open if the person arrives at home.

Thx in advance

Next try:

{{ trigger.from_state.state != 'home' and trigger.to_state.state != state_attr('zone.w_dorf_3km','friendly_name') }}

Note: This would allow this change: w_dorf_3km → home

Or do you want to block every interaction between this two zones?

1 Like

For this use case I want to block every interaction between this two zones.
It should only trigger if a person enters w_dorf_3km from outside (not_home/absend in German).