[Newbie] First trial of automation - Without success

Good morning everyone!

I am at the relly begining of my Home Assistant journey, and I am trying to make my first automation (unfortunately without success!).

First of all, I didn’t had any systems, but wanted to discovered this “world”, so I installed home assistant on my Windows computer, just to make some trials. Now, I have Homeassistant running, with some devices detected.

I linked my phone , to I (Michaël), and looks to be OK. When I turn of the WIFI of my phone, my status apear as “Absent”.

I would like to make my first routine, and receive a notification when I leave home, so I created this:

However, when my status move from “present” to “absent” nothing happen… So I guess something is not well done!
I tried to click on the button "execute"and I receive a notification:

So I Guess my problem come from the trigger and not from the last part. But I am not able to understand where exactly is the problem. In the “Automation.yaml” I have this (generated automatically):

  • id: ‘1587499843796’
    alias: Alert me when Michaël leave home
    description: ‘’
    • entity_id: person.michael
      event: leave
      platform: zone
      zone: zone.home
    • data:
      message: Michaël est partie en courant !
      notification_id: 1234
      title: Run Run Forest
      service: persistent_notification.create

Thanks in advance for your help :slight_smile:

Did you link whatever device tracker you are using on your phone to person.michael?

I think yes. I did that:


My phone is detected via the “freebox integration”
Nothing was detected automatically when I started

Just there (sorry for double posting, I can put only one image)

Freebox is not a gps integration, so it cannot use zones.

You can use the state of the device tracker instead.

  platform: state 
  entity_id: device_tracker.telephone_michael_s10
  from: 'home' 
  to: 'not_home' 

Or the state of the person entity if you prefer, both will give an identical result in this case.

Works now :slight_smile:

Thanks a lot for helping me in my first “hello world”!

PS: Do you now if there is one page where I can find documentation about the possible values (for example, how can i know that I should write “not_home” and not “not home”) ? I found this page : https://www.home-assistant.io/integrations/person/

But it’s more an explanation of the process than of the instances and possible states values

1 Like

If you have a look in developer tools > states it shows what the actual states are that the entity shows. You should mirror them exactly for state based triggers.

1 Like