AlexandrErohin / home-assistant-tplink-router

Home Assistant component for TP-Link router administration with sensors, button reboot, switches and device tracking.
https://community.home-assistant.io/t/custom-component-tp-link-router-integration
MIT License
137 stars 16 forks source link

Devices are marked as "unavailable" after Home Assistant reboot, instead of as "away". #81

Closed MathisP75 closed 2 months ago

MathisP75 commented 2 months ago

Describe the bug When a device is not present on the network, it should be marked as "away". However, upon restarting Home Assistant, devices are marked as "unavailable" until the device connects to the wifi network again.

Additional Information (please complete the following information)

MDV85 commented 2 months ago

Hi. DECO X60 the same problem .....

AlexandrErohin commented 2 months ago

After restarting Home Assistant all sensors/device_tracker from all integrations become unavailable until an integration set current state to a sensor. There are a lot of device_trackers can be from several integrations. After restarting Home Assistant the integration doesnt know how many devices connected to the router until the router tells. But the router can tell only active devices - it doesnt tell about all devices which were connected in the past. Since this moment the integration can mark the device as away when this device is no longer on the router list of active devices