šŸ§Æ Person_Alert_Blueprint

I set it up to only announce a previous zone that is also in the zone list that the automation knows about. Otherwise it will most often state from away to ā€¦

You may have to look at the code and build your own version if this doesnā€™t work for you.

I have basically all the zones in my list listed for everyone, about 15 of them.

  description: Alert when we go places
  trace:
    stored_traces: 20
  use_blueprint:
    path: SirGoodenough/Person_Alert_Blueprint.yaml
    input:
      people2monitor:
      - person.jen
      zone2monitor:
      - zone.home
      - zone.katy_s_kloset
      - zone.follicle_assembly_building
      - zone.feed_store
      - zone.nail_shop2
      - zone.belva
      - zone.clinic
      - zone.expo
      - zone.lakewood
      - zone.mountain
      - zone.shawano
      - zone.somerhome
      - zone.suring
      - zone.townsend
      - zone.rose_estate
      - zone.wisconsin_illinois_border
      enter_action:

It will announce arriving or leaving for any of these if the the other is unknown, or announce both of them if both are known.

The other thing you may be running into is the hold period.
Also the device takes time to sample and send the change to Home Assistant. That all has to happen before HA knows to do anything. Often we get home, out of the car, and take off our coats before the message pops that we are home.

1 Like

Hi
not sure what is wrong but i do not get any information for leaving and coming HOME.
Other ones work ā€¦ well mostly.
any idea?

for example
my daughter came back home 20:09.53. I can see in home assistant ā€œWas detected at homeā€
Screenshot 2023-05-02 201845

blueprint

What does your BluePrint calling Automation look? do you have the home zone in the monitor list?

      zone2monitor:
      - zone.home

Also there is a settling time (hold period) that makes sure the person is in a zone for a time period you set before it allows action.

      hold_period:
        hours: 0
        minutes: 5
        seconds: 0

5 minutes has been working for me but I believe I miss a few, however I still hear a few left home, arrived home when they were here but rebooted their phone or something or the phone went brain dead for a bitā€¦

Hi
Yes. All the zones are setup correctly.
I left home today and didnā€™t get notification. But i got one when I arrived at work.



You will have to look at what the variables are on a trace like the first one there where you think it should trigger but doesnā€™t. Possibly a capitalization problem, some timing thing, hard to guess without it happening to me. Since it seems to work except for a single zone, it comes down to the details.

Also, to everyone, I added in some code I had missing in the samples. I forgot the sequence section of the helper script last time I edited the samples. It should all be there now. Thanks to @Valiante for pointing that out. (I hope you are the same person that got to me on Discord!!)

@Sir_Goodenough - yes it was me! :blush:

@Chaos666uk - I was experiencing the same thing. It turned out to be the case-sensitive nature of YAML, and the condition deciding Home <> home. Iā€™ve just made a fork & a pull request on the repo that should sort it by converting the variables to lowercase before theyā€™re compared.

Can you explain then how to update the Blue Print to make the changes.

I have been using the blueprint for almost two weeks and have problems.
I have many zones created and the all trigger as expected, but here is my problem that I do not know where to look to fix it.

I have a weekly Drā€™s appointment for treatment.
When I went yesterday my phone startedto go ā€œcrazyā€. Within a span of 13 minutes I had over 70 messages saying I was enetering home, leaving home, and entering and leaving the Drā€™s.

This also happens at other places as well. It will tag me as enetering and leaving multiple times in the space of a few minutes.

I have gone back to the companion app (android) and looked at my settings, but am unsure what might be the conflict.

Can anyone shed some light on this.

Also on my automation page for the blue print there is a typo

Person Alert Honitor - 2023-03-01.1

I think it should be

Person Alert "M"onitor - 2023-03-01.1

Thank you.

Certainly. I simply edited the variables section to convert them to lowercase on the fly, thus:

variables:
  people2monitor_var: !input people2monitor
  zone2monitor_var: !input zone2monitor
  friend_zone: >
    {% set ns = namespace(zone=[]) %}
    {% for z in zone2monitor_var %}
    {% set ns.zone = ns.zone + [states[z].attributes.friendly_name | lower] %}
    {% endfor %} 
    {{ ns.zone }}
  to_state: '{{ trigger.to_state.state | lower }}'
  from_state: '{{ trigger.from_state.state | lower }}'
1 Like

Issue and PR created for this. I will look at it shortly.

@carltonb if you had the thing shifting zone 2 zone z zone really fast, you may want to increase the Hold Period. This thing is reacting to zone changes on the person listed. It does not generate zine changes. My only other thought is the phone was off line, and when it came back on line it caught up?

The PR is to fix problems with upper/lower case and some zone changes not being sceen because the value is case sensitive.

And thanks for the typo, my old eyes didnā€™t see it :cry:

Posted update version for above issue:

I will change the hold period and see what happens.
Thank you.

1 Like

Is there a way to write multiple messages and choose which one to send based on the person triggering the action? Alternatively, is it possible to customize the message with the name of the person triggering the action?

I would like to send a Telegram message to the person triggering the action in this way:

service: notify.telegram_person_1
data:
  message: Welcome back home, (name of person_1)!

There are sample files on how to do similar things in the documentation.

Nice blueprint, wanted to use it to drill down my current automation.

So I use the blueprint as followed.

  • Added Person A and Person B to Zone Home.
  • When person leave zone Home, he turns on Alarm and turns off Heater.
  • Person A went to work, this triggered to Turn off the Heater and Turn on Alarm.
  • Result: Person B (not that technical) got the chills, goes down to turn on the heater, triggers the alarm.

So is it possible to make the following with this blueprint?

  • When no one is not in the zone2monitor, activate Alarm and turn off heater.
  • When 1 person enters the zone2monitor, disable Alarm and turn on the Heater.

At this moment it looks like when person A leaves home, the alarm is turned on and the heater is turned off.

This is not real hard to do. You should be able to pull this off without this BP with a bit more knowledge.
Know that the actual value of a zone entity is the number of people in it. So look at the home zone, if the value is 0, no one is home. Just make an automation based on that.

1 Like

BLUEPRINT UPDATED:

Jump known zone to known zone Action

I think this is what i want to use, but only one direction. Hoping you could confirm/deny/ridicule me on how to do this.

Basically when my children leave our house to go to school I want it to shut off their room.
When they return home from school i want it to do something else.

Do i need a separate automations?

  1. For ChildX leaves house
  2. ChildX jumps from school to home? this is where iā€™m confused, jump seems to be a any-to-any relationship? can I do it just one direction?

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.

Ah - thatā€™s the info that I missed, thanks for clarifying