-
Notifications
You must be signed in to change notification settings - Fork 16
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
HA 2024.1 introduces a breaking change #480
Comments
Antony, my system has been working on the latest version since you modified the code, today I upgraded to the latest beta candidate and the Foxess_modbus integration fails to load with a metaclass warning. I had another integration (Sun2) which was updated to support the new FrozenOrThawed metaclass and that has survived the upgrade. I've tried a complete wipe, re-install and rebuilt it from scratch and confirmed it is the latest beta of HA Core which causes the problem. Sadly it looks as if something wasn't stable on the dev release, i've downgraded back to it and Foxess_modbus works ok again - so seemingly there is still a breaking change in the current beta release candidate of core. Previous (dev) ha core release - 2024.1.0.dev20231218 Latest (breaking) beta ha core release - 2024.1.0b2 I've included the logs below
|
Interesting. I can't see any relevant PRs which have made it into HA, so I'm not sure what's happened on their side. I also ran my little test script with the latest HA dev branch and that still passes. I think I'll have to run up the latest docker image (they don't publish dev python packages as far as I can tell), but that'll have to wait a few days I'm afraid. |
no problem, thanks 👍 |
Aha, they went and added a metaclass to Entity as well. |
Annoyingly trying to do the same trick doesn't work. I'll have to come back to this one over the weekend |
FWIW, the core weather integration does like this to meet the metaclass requirements: |
I think you can do like this: class ModbusEntityMixinmeta(ABCCachedProperties, _ProtocolMeta):
pass
class ModbusEntityMixin(
ModbusControllerEntity,
ModbusEntityProtocol,
_ModbusEntityMixinBase,
metaclass=ModbusEntityMixinmeta,
):
... |
Same issue since I updated HA from 2023.12.4 to 2024.1.0 with FoxEss Modbus v1.8.0. Rollback to previous HA release. Find below logs contents : 2024-01-04 08:51:34.432 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-01-04 08:52:09.846 WARNING (MainThread) [homeassistant.components.camera] SUPPORT_ON_OFF was used from xiaomi_cloud_map_extractor, this is a deprecated constant which will be removed in HA Core 2025.1. Use CameraEntityFeature.ON_OFF instead, please create a bug report at https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues The above exception was the direct cause of the following exception: Traceback (most recent call last): |
Presumably the thing to do is just not upgrade HA until this is resolved, right? |
Yes definitely wait, it won’t be long and there are very likely other integrations that don’t work because of the changes made in HA core - keep a close eye on the issues area of your favourite integrations to make sure all are fixed before you upgrade. |
The weatherlink-integration is also affected, while the viessmann-integration continues to work properly. |
Hi all |
I was hoping to find time tonight but got stuck at work until late. Hopefully Saturday? |
The underlying issue may or may not be the same, but for hass-weatherlink it was home-assistant/core#107149. A fix for that has been released in HA 2024.1.1. |
Did someone try? |
Nope :/ Still the same with 2024.1.1. Reverting ..
|
yes, same problem with 2024.1.1. Only the weatherlink integration is working again with 2024.1.1. |
The change in HA 2024.x needs changes in how affected integrations handle entities, the foxess-modbus integration work is in progress, please bear with us, once it is completed a new version of the integration will be released - hopefully not long now. |
Is the new Version available on HACS already? |
Yeah it's on HACS now |
This has been fixed in 1.8.1, which is available on HACS. Apologies for the delay! |
Looks like we'll need to do something like:
Alternatively, it looks like this might also work:
I'm not sure whethe rthis will work before EntityDescription's metaclass was introduced. Needs testing...
Originally posted by @canton7 in #479 (reply in thread)
The text was updated successfully, but these errors were encountered: