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

Breaking change in HA2024.x #104

Closed
FozzieUK opened this issue Dec 26, 2023 · 2 comments · Fixed by #105
Closed

Breaking change in HA2024.x #104

FozzieUK opened this issue Dec 26, 2023 · 2 comments · Fixed by #105

Comments

@FozzieUK
Copy link

Just a heads up, i'm running a dev version of the latest HA (2024.1.0.dev20231218) and there is a change to the way that HA handles metaclasses (I think this PR home-assistant/core#105512), it has broken a few of my integrations , this one included, i'm working through them but the logs from Sun2 at startup are -

2023-12-24 09:47:40.823 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up sun2 platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/sun2/sensor.py", line 1299, in async_setup_platform
_sensors(
File "/config/custom_components/sun2/sensor.py", line 1235, in _sensors
_SENSOR_TYPES[config].cls(
File "/config/custom_components/sun2/sensor.py", line 391, in __init__
super().__init__(loc_params, extra, entity_description, "civil", name)
File "/config/custom_components/sun2/sensor.py", line 202, in __init__
entity_description.name = name
^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 4, in __setattr__
dataclasses.FrozenInstanceError: cannot assign to field 'name'
@pnbruckner
Copy link
Owner

Yep, saw that, have a fix, just haven't had time to release it. Hopefully today or tomorrow. Thanks!

@FozzieUK
Copy link
Author

that's great, happy to test it as soon as it's released, many thanks 👍

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

Successfully merging a pull request may close this issue.

2 participants