You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/config/custom_components/speedport/device_tracker.py", line 85, in icon if self.is_connected: ^^^^^^^^^^^^^^^^^ File "/config/custom_components/speedport/device_tracker.py", line 75, in is_connected return self._device.connected ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'connected'
The text was updated successfully, but these errors were encountered:
I extend your code with the following if condition in line 75 and 113 of "/config/custom_components/speedport/device_tracker.py"
@property
def is_connected(self) -> bool:
"""Return device status."""
if self._device is None:
return False
return self._device.connected
@property
def name(self) -> str:
"""Return device name."""
if self._device is None:
return False
return self._device.name
This helps for the previous exception, but with the new Core OS it seems that "async_forward_entry_setup" is not supported anymore in this way.
As I only have experience with python, but not writing code for HA (I'm a new HA user), it is better you will patch the code.
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:234
First occurred: January 4, 2025 at 8:28:27 PM (7 occurrences)
Last logged: 11:52:30 AM
Detected code that calls async_forward_entry_setup for integration speedport with title: Speedport and entry_id: 01JGPYMJGYV1WMVJV04X49TSPJ, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1, please report this issue
I found some other implementation that changed it like
###################
# Calling hass.config_entries.async_forward_entry_setup is deprecated, since Home Assistant 2025.1
''' old format
for platform in PLATFORMS:
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(entry, platform)
)
'''
# new format
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
###################
File "/config/custom_components/speedport/device_tracker.py", line 85, in icon if self.is_connected: ^^^^^^^^^^^^^^^^^ File "/config/custom_components/speedport/device_tracker.py", line 75, in is_connected return self._device.connected ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'connected'
The text was updated successfully, but these errors were encountered: