home-assistant/core

Immutable being enforced in 2024.1, when documentation says should only be depreciated until 2025.1

jdeath opened this issue · 1 comments

jdeath commented

The problem

My custom component was failing because of the lower statement:
airthings_ble. val.native_unit_of_measurement = VOLUME_PICOCURIE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 4, in setattr
dataclasses.FrozenInstanceError: cannot assign to field 'native_unit_of_measurement'

I changed it to use a sensors_mapping[key] = dataclasses.replace instead, which fixed the issue (thanks to airthings_ble by @emontnemery).

There was never any warning in the logs in previous releases. I was pointed to this, which says this should not be enforced until 2025.1
https://developers.home-assistant.io/blog/2023/12/11/entity-description-changes/

What version of Home Assistant Core has the issue?

core-2024.1.0

What was the last working version of Home Assistant Core?

core-2023.12.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.