thomluther / anker-solix-api

Python library for Anker Solix API
MIT License
74 stars 15 forks source link

Recycle the device details dict with each sites query to remove obsolete devices #24

Closed thomluther closed 7 months ago

thomluther commented 7 months ago

Currently the device details dictionary is not recycled at all for obsolete devices. This may cause invalid device details data when devices are removed from a site, or when the API is switched to test mode and switching example folders with different data sets. While the sites dict is recreate on each update_sites query, the devices dict is just being updated and enhanced, but not recycled for devices that are no longer managed by the found sites.