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

Force data update for all WS commands #2438

Merged
merged 1 commit into from
Jan 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions custom_components/hacs/tasks/setup_websocket_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ async def hacs_repository_data(hass, connection, msg):
elif action == "install":
was_installed = repository.data.installed
repository.data.selected_tag = data
await repository.update_repository()
await repository.update_repository(force=True)
await repository.async_install()
repository.state = None
if not was_installed:
Expand Down Expand Up @@ -336,7 +336,7 @@ async def hacs_repository(hass, connection, msg):

elif action == "uninstall":
repository.data.new = False
await repository.update_repository(True)
await repository.update_repository(ignore_issues=True)
await repository.uninstall()

elif action == "hide":
Expand All @@ -347,15 +347,15 @@ async def hacs_repository(hass, connection, msg):

elif action == "show_beta":
repository.data.show_beta = True
await repository.update_repository()
await repository.update_repository(force=True)

elif action == "hide_beta":
repository.data.show_beta = False
await repository.update_repository()
await repository.update_repository(force=True)

elif action == "toggle_beta":
repository.data.show_beta = not repository.data.show_beta
await repository.update_repository()
await repository.update_repository(force=True)

elif action == "delete":
repository.data.show_beta = False
Expand All @@ -376,7 +376,7 @@ async def hacs_repository(hass, connection, msg):
repository.data.selected_tag = None
else:
repository.data.selected_tag = msg["version"]
await repository.update_repository()
await repository.update_repository(force=True)

hass.bus.async_fire("hacs/reload", {"force": True})

Expand Down