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

WiserHubHandle' object has no attribute 'async_force_update' Error #305

Closed
rlewis187 opened this issue Oct 1, 2022 · 3 comments
Closed

Comments

@rlewis187
Copy link

I use a number of buttons to boost hot water for various lengths of time, since updating to 3.1.6 and HA 2022.9.7, I have been getting an error when trying to use the buttons:


Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/wiser/services.py:222
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 07:14:56 (24 occurrences)
Last logged: 14:53:07

    [547248781296] 'WiserHubHandle' object has no attribute 'async_force_update'
    [546698466768] 'WiserHubHandle' object has no attribute 'async_force_update'
    [546343400160] 'WiserHubHandle' object has no attribute 'async_force_update'
    [546344522400] 'WiserHubHandle' object has no attribute 'async_force_update'

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/config/custom_components/wiser/services.py", line 222, in async_boost_hotwater
    await data.async_force_update()
AttributeError: 'WiserHubHandle' object has no attribute 'async_force_update'

I previously had an entity linked to the button, but have removed it so that it now just calls the service, here is my config for the 5 minute boost button:

show_name: true
show_icon: true
type: button
show_state: false
icon_height: 60px
name: 5 min HW
icon: mdi:fire
tap_action:
  action: call-service
  service: wiser.boost_hotwater
  data:
    time_period: 5
  target: {}

The call service function does work however, the response time is pretty slow whereas before it was instant.

msp1974 added a commit that referenced this issue Oct 3, 2022
… object has no attribute 'async_force_update' Error #305
@msp1974
Copy link
Collaborator

msp1974 commented Oct 3, 2022

Sorry, not sure how I didn't pick this up in testing. When we send a command to the hub, we then run a hub update to get updates data. This was calling the incorrect hub update command, so whilst the command was sent and the boost started, it would not have shown in the UI until the next scheduled hub update (default 30s interval).

3.1.7 will be out tonight that fixes this.

@msp1974 msp1974 mentioned this issue Oct 3, 2022
@rlewis187
Copy link
Author

No need to apologise! Still the best integration on Home assistant. Thanks for the super fast response.

Tested and working as before now, happy for you to close the issue.

@msp1974
Copy link
Collaborator

msp1974 commented Oct 4, 2022

Good to hear. Thx

@msp1974 msp1974 closed this as completed Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants