thomluther / anker-solix-api

Python library for Anker Solix API
MIT License
38 stars 12 forks source link

Automatically update devices dict with other device details related methods #26

Closed thomluther closed 4 months ago

thomluther commented 4 months ago

This is helpful to keep existing device details up to date, even if device details query is not run. The HA integration does device details queries less frequently than site details queries due to amount of additional Api requests needed for all device details. However, the last known device details are provided to the integration with each sites update interval. If any other method will be triggered that contains device related details, this should automatically refresh the api devices dict as well with the latest information to make them directly available to the integration.

thomluther commented 4 months ago

All device details updates that do not depend on other fields retrieved from other queries have been moved to the request method itself. So they are now automatically updating the class devices dict when called via the update_device_details method or directly.