Closed oxan closed 5 years ago
Okay, so unfortunately this PR doesn't work; as sometimes (but not always) when my device disconnects it still shows up in the iw dev <dev> station dump
output...
This is unfortunate. It seems you have to wait a while to what AP (if any) the device connects to.
Last night, my phone was incorrectly marked as away while it still was connected to the WiFi. Further inspection of the logs revealed the following sequence of events:
wlan1
)push_event.sh
gets notified and tells Home Assistant that I'm homewlan0
)push_event.sh
gets notified and incorrectly tells Home Assistant that I'm awayRelevant log fragment:
I think the best solution is to check if the device is still connected to any radio (comparable to what's done in
sync_state
) before sending the disconnect check.