Skip to content

Commit

Permalink
Force data update for all WS commands (#2438)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Jan 9, 2022
1 parent f03b534 commit 8ad321d
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 8ad321d

Please sign in to comment.