How does the iOS companion App push sensors updates in almost real time?

Don’t get me wrong. It’s a great feature. I’m just curious how it’s achieved. I installed the Home Assistant companion App from the App store, set it up, confirmed it’s recognized by HA, then close the APP and make sure it’s not running in the background. When I switched from WiFi to cellular, or turned on/off the Do-Not-Disturb mode, the change is synced almost immediately to HA.

I tried to turn off background app refresh but still the update is immediate. So please someone help me with my curiosity. Thanks!

Certain things can update closer to real time than others, so there’s not really one way.

Changing the ‘do not disturb’ setting causes the app to wake up or launch one of the Home Assistant app’s embedded apps to tell it about the change, which causes them to update quickly.

Changing network settings may do a similar thing with GPS coordinates, causing a location update which also updates sensors.

1 Like