Change scan_interval for AndroidTV integration

Hi,

As of 2022.2 Android TV integration has moved from configuration.yaml to automatic config via UI. This integration uses local polling to determine device state. The default scan_interval is too long and I had changed it in the yaml file to every 3 seconds. Is there a way to change the scan_interval with the UI? I can’t seem to find it.

@JeffLIrion may know…

Thanks

The only way to do it is to use a time pattern automation that calls the homeassistant.update_entity service on the entity.

Thanks!

For anyone else running into this problem, here’s the automation code to use:

alias: Update AndroidTV every 2 sec
trigger:
  - platform: time_pattern
    seconds: /2
action:
  - service: homeassistant.update_entity
    target:
      entity_id:
        - media_player.AndroidTV_basement
        - media_player.AndroidTV_familyroom
        - media_player.AndroidTV_.......
mode: single

Also, don’t forget to disable polling for updates in the integration configuration

4 Likes

I’ve implemented the code. But i am unsure how to disable polling updates in the integration configuration, I don’t see nay option. Could you please elaborate? TIA

Go to the Integrations page and then select the three vertical dots in the integration’s box. There select System options and then unset Enable polling

I’ve tried this recently, however, the update_entity service seems to no longer cause it to send a new poll, and it still takes 10 seconds to update the state. Any solutions?