Where do I find an integrations scan interval?

With 2021.6 I like the fact that I can change an intergrations scan interval but I haven’t been able to find the default interval for the integration. For instance I want to change the interval on IQVIA to be once or twice a day but after looking thru the integration code I didn’t see how often it currently runs.

Polling sensors update every 30 seconds by default.

Where did you find this information? IQVIA goes to the internet that often? wow

No. That is a cloud polling sensor.

DEFAULT_SCAN_INTERVAL = timedelta(minutes=30)

https://github.com/home-assistant/core/blob/f778467d631b8eca9499c776862e6a178317aa2c/homeassistant/components/iqvia/__init__.py

Remember that only YAML integrations support setting a scan_interval - for UI ones you have to disable automated updates, and then use the homeassistant.update_entity service to update it on demand.

2 Likes

@tom_l, thank you so much, I looked at that code but never saw it

@Tinkerer yep, that’s the way I read the update…thanks

Apologies for re-opening this old thread, but I a trying to get clear on what is meant by “disable automated updates”. Do you do this by going to the Integration List under Configuration > Integrations, then for the integration in question, choose the three vertical dots, then choose System Options, then turn off “Enable polling for updates” or is it done some other way? If some other way, can you please help me understand how to do this? So far when I try to use homeassistant.update_entity on the IotaWatt integration I dont get updates any more frequently than the default 30 second polling.

Yes, that’s it.

It’s entirely possible that the API for IoTaWatt doesn’t support faster updates than every 30 seconds :man_shrugging:

If you need help with that though, best to start a fresh topic

1 Like

See this for a complete explanation from Tom read here:
How to set a custom scan_interval.