HA Android App Wifi Connection sensor for presence detection

Hey all,
I just stumbled across the Wifi Connection sensor on my android HA app (wife has same model of phone). My WAF is very low with the GPS presence detection. I was wondering if it is possible to set home/away status based on the SSID of my network from this sensor? Our network is split between default and 5gHz so I would need to capture both as our phones could be connected to either at any given time.

The purpose of capturing this information would be to change set point on thermostat and to arm our camera system to send notifications. I played around with trying to use the sensor to toggle a boolean but couldn’t figure out how to do anything other than verify if the wifi is on.

you dont have to use a device tracker to create an automatoin based off teh state of some sensors.

trigger: wifi connection sensor state = desired SSID list
action: turn on boolean

not any different than using the person or device tracker entity

Here is an example how i did this with a template binary_sensor:

  - binary_sensor:
      - unique_id: smartphone_mike_wlan_home_connected
        state: "{{ is_state('sensor.YOURPHONENAME_wifi_connection', 'YOUR_SSID') or is_state('sensor.YOURPHONENAME_wifi_connection', 'YOUR_SSID_5GHz') or is_state('sensor.YOURPHONENAME_wifi_connection', 'GastWIFI') }}"
          seconds: 10
          friendly_name: "smartphone_mike_wlan_home_connected"

This turns on when connected to one of the three SSIDs and off if it is not connected for about 10 seconds. This works really good on my Samsung S21, even when the wifi of the phone goes to sleep (which it does on every phone i think when it is not used for a longer time), the sensor still says you are connected. Only when coming home sometimes it is a little bit slow when the phone is in my pocket and screen is off.

1 Like

pixel devices do not do that, it remains connected forever

and you will also notice that the phone itself has not connected during that time. Sometimes itll connect when in the driveway and others it may connect after you are already inside. The app itself registers for when the connection status changes so it really depend on how fast the device chooses to connect. That is why some also use BT because it is faster in that regard.

Sure, i didn’t want to say this belongs to the app, this is also because the wifi “sleeps” somehow when the phone is not used. The companion app does a real good job and i’m really thankful you guys made this fantastic piece of software for android with all its sensors and the possibilities it creates.
Thanks for the hint with the pixel phone, maybe i switch when the next buy is on the list :smiley: