Skip to content

Detected that custom integration 'sunpower' sets option flow config_entry explicitly, which is deprecated #111

Description

@LubJosh

at custom_components/sunpower/config_flow.py, line 103: self.config_entry = config_entry. This will stop working in Home Assistant 2025.12

My integration stopped working yesterday (April 6 2025). When trying to restart I get the above message, plus these errors:

Error fetching ipp data: Invalid response from API: Timeout occurred while connecting to IPP server.

Unexpected error fetching SunPower PVS data

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 380, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 281, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/sunpower/init.py", line 348, in async_update_data
return await hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<4 lines>...
)
^
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/sunpower/init.py", line 287, in sunpower_fetch
data = convert_sunpower_data(sunpower_data)
File "/config/custom_components/sunpower/init.py", line 102, in convert_sunpower_data
for device in sunpower_data["devices"]:
~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'devices'

Error setting up entry PVS 192.168.86.38 for sunpower

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 751, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/sunpower/init.py", line 385, in async_setup_entry
await coordinator.async_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 356, in async_refresh
await self._async_refresh(log_failures=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 380, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 281, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/sunpower/init.py", line 348, in async_update_data
return await hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<4 lines>...
)
^
asyncio.exceptions.CancelledError: Global task timeout

The following curls give the following responses:

$ curl http://172.27.153.1/cgi-bin/dl_cgi?Command=DeviceList
{ "status":403, "error" : "Unauthorized", "path":"" }
$ curl http://172.27.153.1/cgi-bin/dl_cgi?Command=DeviceList
{ "status":403, "error" : "Unauthorized", "path":"" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions