audiconnect / audi_connect_ha

Adds an audi connect integration to home assistant
MIT License
238 stars 97 forks source link

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

Closed oleg-d closed 7 months ago

oleg-d commented 7 months ago

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 commented 7 months ago

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.

coreywillwhat commented 7 months ago

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.

oleg-d commented 7 months ago

amazing

coreywillwhat commented 7 months ago

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

coreywillwhat commented 7 months ago

325 for manually updating from the cloud.

coreywillwhat commented 7 months ago

326 for turning active polling on and off

cdnninja commented 7 months ago

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

oleg-d commented 7 months ago

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.