Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Refreshing Devices During Deletes or Manually #806

Merged
merged 6 commits into from
Dec 11, 2023

Conversation

jmillnik
Copy link
Contributor

@jmillnik jmillnik commented Dec 7, 2023

  • Add an optional force_refresh parameter to delete_timers and delete_alarms
  • Add a refresh_devices service to allow manual refreshes

Both options invoke async_request_refresh on the coordinator and therefore restart the refresh timer to prevent over-requesting devices. They provide a reasonable (and optional) method to immediately update devices when deleted, or to allow users to refresh timers/alarms.

@KapJI
Copy link
Collaborator

KapJI commented Dec 7, 2023

Add an optional force_refresh parameter to delete_timers and delete_alarms

Do we really need this to be configurable? I'm ok with doing it by default, seems reasonable to me.

@jmillnik
Copy link
Contributor Author

jmillnik commented Dec 7, 2023

Add an optional force_refresh parameter to delete_timers and delete_alarms

Do we really need this to be configurable? I'm ok with doing it by default, seems reasonable to me.

I know some people have issues with timeouts when they get too many queries. Deleting multiple alarms in succession with automations would be likely to cause noise. Perhaps default to true but leave it there to allow the option to set it to false?

@KapJI
Copy link
Collaborator

KapJI commented Dec 7, 2023

Yeah, makes sense. Let's default to refresh and name it skip_refresh then. Also it will be great if you can add translations to other languages using some online service.

@jmillnik
Copy link
Contributor Author

jmillnik commented Dec 7, 2023

Yeah, makes sense. Let's default to true and name it skip_refresh then. Also it will be great if you can add translations to other languages using some online service.

Makes sense will knock this out after work and get it all cleaned up. Just fixed my pre-commit to fix the linting. Running on a windows laptop atm :(

@jmillnik jmillnik requested a review from KapJI December 7, 2023 21:02
README.md Outdated Show resolved Hide resolved
custom_components/google_home/services.yaml Outdated Show resolved Hide resolved
@jmillnik jmillnik requested a review from KapJI December 8, 2023 14:53
Copy link
Collaborator

@KapJI KapJI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@KapJI KapJI merged commit 370494b into leikoilja:master Dec 11, 2023
5 checks passed
@KapJI KapJI added the feature New feature or request label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants