ESPresence Sensor as Condition in Automation

Hi,
I just start with ESPresence and room / beacon tracking.
I’ve installed 2 ESP32 and some Phones and my Apple Watch as Beacon / Sensor.

The Sensors are named

  • sensor.mark_phone and
  • sensor.mark_watch

In the Frontend I’ve created placed the entity sensor.mark_phone and it displays the room, e.g.:

  • livingroom
  • kitchen
  • not_home (if the phone is not reachable)

Now I would like to use this state in my automation:

alias: Alarm with MQQT
description: ""
trigger:
  - platform: state
    entity_id:
      - group.windows
    to: "on"

**condition ????**

action:
  - service: notify.notify
    data:
      message: Test
mode: single

The action should be run if sensor.mark_phone == “not_home”

What’s the condition to do so?

Best regards Mark

That would be the following:

condition:
  - condition: state
    entity_id: sensor.mark_phone
    state: 'not_home'

Thanks madface,

I thought that I’ve tried this version before (but perhaps there was a typing error) and there are many examples with distance e.g. which are quite more complicated.