audi_connect_ha icon indicating copy to clipboard operation
audi_connect_ha copied to clipboard

Feature request: Be able to use Spook "enable/disable polling for updates" service on this integration

Open oleg-d opened this issue 1 year ago • 4 comments

I would like to be able to use the Spook ability to enable and disable the polling of the Audi integration. Currently if I call the "enable polling for updates" on the Audi integration it does not poll to update the data.

On the cyr-ius this was possible worked perfectly, I had control over through automation when the integration polls for updates. In my case I had it poll on the hour every hour between 7am to 10pm. This is super handy to avoid over polling the Audi API, as I can enable polling and then disable polling until the next time I want to poll.

I don't think it's the same as refresh_data as that polls the car, but I would like to just poll the cloud data if that makes sense, not the latest from the car but the latest from the Audi server.

With the current integration I have it sent to 60 min poll, but who knows when that 60 min poll trigger is. When I look at my dashboard I have no idea knowing how "old" the data is relative to what time it is.

oleg-d avatar Mar 16 '24 08:03 oleg-d

Maybe I've found a workaround for my use case, there is a HA service called "Home Assistant Core Integration: Reload config entry" that I am using to reload the Audi integration on demand.

oleg-d avatar Mar 16 '24 20:03 oleg-d

A method for this will be introduced with a new service call under PR #325 . You'll be able to pull updates from online service on demand without turning polling on or off or reloading the integration.

coreywillwhat avatar Mar 26 '24 19:03 coreywillwhat

amazing

oleg-d avatar Mar 27 '24 08:03 oleg-d

I've also added an options flow handler so polling interval can be changed on the fly from the front end.

coreywillwhat avatar Mar 27 '24 14:03 coreywillwhat

#325 for manually updating from the cloud.

coreywillwhat avatar Apr 03 '24 18:04 coreywillwhat

#326 for turning active polling on and off

coreywillwhat avatar Apr 03 '24 19:04 coreywillwhat

Do we need a service for this as well now that the setting exists?

cdnninja avatar Apr 06 '24 15:04 cdnninja

I am satisfied with the newly implemented refresh_cloud_data. I am using that instead of the way I did it with Spook in the other integration so you are free to close this.

oleg-d avatar Apr 07 '24 07:04 oleg-d