How to find out which states a certain sensor has?

Hi guys,
I have a sensor (Unify) that detects if a certain WifiDevice is currently logged in my WiFi or not.
I want to do a simple automation that when a device is absence and comes back to the Wifi I get a push notification.
But I’m always searching where all the potential states of such a sensor are listed.
Is the state “On” or “Off” ? Is it “active / inactive” or “true / false” ?

How do I know that? Where can I found that states?

This is my automation so far. I just want to get a notification, when a device joins Wifi. But it doesnt work.

alias: Presence Detection
description: ''
  - platform: state
      - device_tracker.peter_pixel_6
    from: away
    to: home
condition: []
  - service: notify.mobile_app_pixel_6
      message: He is home
      title: Presence
mode: single explains the states of the device_tracker entities. For everything else you can look in Developer Tools → States and see what the current state is.

For historical states you’d have to do a SQL query on the database, something like:

SELECT DISTINCT state FROM states WHERE entity_id = 'device_tracker.peter_pixel_6';

You sir, are a machine.

There is a feature request here that you might like to vote for: