hultenvp / solis-sensor

HomeAssistant integration for the SolisCloud PV Monitoring portal via SolisCloud API
Apache License 2.0
208 stars 42 forks source link

sync scraping to the API update schedule if possible to improve "freshness" #240

Closed jmason closed 1 year ago

jmason commented 1 year ago

By using the "last update" field on the API output, and synchronizing to that plus our expected update schedule, we can record data from the API in HA as soon as possible after it's been recorded, maximising the data "freshness". If anything goes wrong with that, it'll fall back to just updating with a 5-minute period.

hultenvp commented 1 year ago

Nice one! Thanks Justin!