When a phone enters sleep mode, roams, or reconnects, it may briefly drop from the association table. With family consent, Wi-Fi status can serve as a clue. Set confirmation window, offline delay, and manual override. Door locks and other critical actions require independent, reliable triggers.
First do a harmless automation
Use a test lamp. Let Home Assistant read or subscribe to a trusted device state, implement debouncing logic, and avoid direct execution on every startup. Family members can turn off the corresponding tracking and automation.
Distinguish temporary offline from permanent departure
Use a smartphone to sequentially test: sleep mode, switching AP, leaving home, and returning home. Record the visible states and automated trigger responses, while retaining manual control.
Log association records, state transmission, and LED change times. Simulate mobile phone power saving and AP restart to ensure it does not incorrectly detect as "away from home." Place the restore manual control entry in the daily interface.
Transient disconnections do not trigger corrective actions. If prolonged misjudgments occur, use a combination of multiple independently verified and approved conditions.
Check the terminal output

Comments