oischinger / ha_vicare

Inofficial Home Assistant custom component for Viessmann ViCare API
61 stars 34 forks source link

scan interval hardcoded value #111

Closed BrechtMo closed 1 year ago

BrechtMo commented 2 years ago

Hi,

I'm running into the API limitation. Since a couple of versions ago, the scan_interval option is no longer available so it's not easy anymore to have HA poll the Viessmann API less frequently. A possible solution was detailed here: https://github.com/home-assistant/core/issues/65806

However I'm wondering if using update_entity service will make an API call for every entity I want to update. Lets say I want to update ten entities every five minutes in one automation, does this result in 10 API calls per five minutes or just one?

The reason I'm running into the API limits with the default scan interval value of 60 seconds is that I'm using HA to frequently change parameters of my boiler.

I simply want to update all values of the boiler every two or three minutes instead of every minute. This way, I have enough API calls left to run my boiler controls and still have all metrics available.

cagnulein commented 2 years ago

+1 !

oischinger commented 1 year ago

I experimented with homeassistant.update_entity a while ago. I'm not sure anymore but I believe I only used a single entity_id as parameter and it seemed to update all other entities of the device.

Otherwise you could still provide a list of entities to homeassistant.update_entity and since the default 60s scan_interval is still being used internally all these entities will be updated with just a single API call.