How to set a custom scan_interval

Go to Settings → Devices & Services, click on the integration’s card.

Next to each instance of the integration click on the three dots icon and select “System options”.

Turn off the polling toggle and click UPDATE.

disable_polling

You can now write an automation to update the integration’s entities with whatever* frequency you want, e.g.

trigger:
  - platform: time_pattern
    hours: "/3"
action:
  - service: homeassistant.update_entity
    target:
      entity_id:
        - sensor.my_sensor_1
        - sensor.my_sensor_2

Notes:

  • The integration will still poll once if your system is restarted or the integration is reloaded.

  • * Do not abuse this to poll external APIs you do not own by scanning too frequently. This may result in the API owner removing access for all users.

8 Likes

When I do this, even if I just run the automation once, it seems like the Prusalink integration keeps polling after - I’m seeing errors in my logs every 90 seconds that it’s trying and failing.

I believe there is an open issue about repeats for failed polling. I’ll see if I can find it later.

EDIT: can’t find it. I’ve asked for guidance and the advice is to open a new issue here:

Please provide as much detail as possible, screen shots of the disabled polling toggle, the automation you used to poll the entity and the errors you receive, and how often.

I recently went through a similar process and learned that, once configured, each of my api pulls were controlled individually. I needed to turn each of them off at the “Integration Entries” level.

This was on OpenWeatherMap’s integration, but I won’t be surprised to learn this is an HA type of thing.

I like that it’s controlled at that level, but it wasn’t immediately obvious that if I turn off polling at the integration level, the entries still need to be updated.

Separately, the process described at the start of the thread isn’t working to poll/update sensors within OpenWeatherMap - and searching for solutions is how I landed here.