Skip to content

[BUG]: HA reloading does not work #293

@bouwew

Description

@bouwew

Describe the bug.

After trying to reload, the HA Log shows:

Logger: homeassistant.config_entries
Source: config_entries.py:963
First occurred: 09:41:04 (1 occurrence)
Last logged: 09:41:04

Error unloading entry Stick for plugwise_usb
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/plugwise_usb/connection/queue.py", line 101, in submit
    response: PlugwiseResponse = await request.response_future()
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 963, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/plugwise_usb/__init__.py", line 171, in async_unload_entry
    await config_entry.runtime_data[STICK].disconnect()
  File "/usr/local/lib/python3.13/site-packages/plugwise_usb/__init__.py", line 345, in disconnect
    await self._network.stop()
  File "/usr/local/lib/python3.13/site-packages/plugwise_usb/network/__init__.py", line 569, in stop
    await self._unload_discovered_nodes()
  File "/usr/local/lib/python3.13/site-packages/plugwise_usb/network/__init__.py", line 523, in _unload_discovered_nodes
    await gather(*[node.unload() for node in self._nodes.values()])
  File "/usr/local/lib/python3.13/site-packages/plugwise_usb/nodes/circle.py", line 1081, in unload
    await self._retrieve_energy_logs_task
  File "/usr/local/lib/python3.13/site-packages/plugwise_usb/nodes/circle.py", line 535, in get_missing_energy_logs
    await task
  File "/usr/local/lib/python3.13/site-packages/plugwise_usb/nodes/circle.py", line 553, in energy_log_update
    if (response := await request.send()) is None:
                    ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/plugwise_usb/messages/requests.py", line 1158, in send
    result = await self._send_request()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/plugwise_usb/messages/requests.py", line 320, in _send_request
    return await self._send_fn(self, suppress_node_errors)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/plugwise_usb/connection/__init__.py", line 234, in send
    return await self._queue.submit(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/plugwise_usb/connection/queue.py", line 121, in submit
    raise StickError(
    ...<2 lines>...
    ) from exc
plugwise_usb.exceptions.StickError: No response received for CircleEnergyLogsRequest to 000D6F0003562D3C

What version of Plugwise USB Beta are you using?

v0.55.5

What was the last working version of Plugwise USB Beta (or Core if not using beta before)?

No response

What version of Home Assistant Core are you using?

core-2025.7.3

What type of installation are you running?

Home Assistant Supervised

How did you install plugwise_usb-beta?

HACS

What kind of Plugwise device is having issues?

Smile: Adam (including Lisa, Tom, Floor)

What firmware version is your Plugwise product at?

2011-06-27 08:43:39+00:00 (Stick)

Logging

No response

Diagnostics information

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions