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

HA 2024.1 introduces a breaking change #480

Closed
canton7 opened this issue Dec 23, 2023 · 21 comments · Fixed by #484 or #487
Closed

HA 2024.1 introduces a breaking change #480

canton7 opened this issue Dec 23, 2023 · 21 comments · Fixed by #484 or #487
Labels
bug Something isn't working

Comments

@canton7
Copy link
Collaborator

canton7 commented Dec 23, 2023

Looks like we'll need to do something like:

class EntityFactoryMetaclass(type(EntityDescription), type(ABC)):
    pass

class ModbusBinarySensorDescription(BinarySensorEntityDescription, EntityFactory, metaclass=EntityFactoryMetaclass):
    ...

Alternatively, it looks like this might also work:

class EntityFactory(ABC, metaclass=EntityFactoryMetaclass):
    ...

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)

@canton7 canton7 added the bug Something isn't working label Dec 23, 2023
canton7 added a commit that referenced this issue Dec 23, 2023
canton7 added a commit that referenced this issue Dec 24, 2023
@FozzieUK
Copy link
Contributor

@canton7

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

2023-12-30 09:58:02.803 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing component custom_components.foxess_modbus
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 822, in get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/config/custom_components/foxess_modbus/__init__.py", line 43, in <module>
from .inverter_profiles import inverter_connection_type_profile_from_config
File "/config/custom_components/foxess_modbus/inverter_profiles.py", line 25, in <module>
from .entities.charge_periods import CHARGE_PERIODS
File "/config/custom_components/foxess_modbus/entities/charge_periods.py", line 8, in <module>
from .modbus_charge_period_config import ChargePeriodAddressSpec
File "/config/custom_components/foxess_modbus/entities/modbus_charge_period_config.py", line 13, in <module>
from .modbus_binary_sensor import ModbusBinarySensorDescription
File "/config/custom_components/foxess_modbus/entities/modbus_binary_sensor.py", line 52, in <module>
class ModbusBinarySensor(ModbusEntityMixin, BinarySensorEntity):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

2023-12-30 09:58:02.807 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'foxess_modbus': Unable to import component: Exception importing custom_components.foxess_modbus
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 822, in get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/config/custom_components/foxess_modbus/__init__.py", line 43, in <module>
from .inverter_profiles import inverter_connection_type_profile_from_config
File "/config/custom_components/foxess_modbus/inverter_profiles.py", line 25, in <module>
from .entities.charge_periods import CHARGE_PERIODS
File "/config/custom_components/foxess_modbus/entities/charge_periods.py", line 8, in <module>
from .modbus_charge_period_config import ChargePeriodAddressSpec
File "/config/custom_components/foxess_modbus/entities/modbus_charge_period_config.py", line 13, in <module>
from .modbus_binary_sensor import ModbusBinarySensorDescription
File "/config/custom_components/foxess_modbus/entities/modbus_binary_sensor.py", line 52, in <module>
class ModbusBinarySensor(ModbusEntityMixin, BinarySensorEntity):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 251, in _async_setup_component
component = integration.get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 830, in get_component
raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing custom_components.foxess_modbus

@canton7 canton7 reopened this Dec 30, 2023
@canton7
Copy link
Collaborator Author

canton7 commented Dec 30, 2023

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.

@FozzieUK
Copy link
Contributor

no problem, thanks 👍

@canton7
Copy link
Collaborator Author

canton7 commented Jan 2, 2024

Aha, they went and added a metaclass to Entity as well.

@canton7
Copy link
Collaborator Author

canton7 commented Jan 2, 2024

Annoyingly trying to do the same trick doesn't work. I'll have to come back to this one over the weekend

canton7 added a commit to canton7/foxess_modbus that referenced this issue Jan 2, 2024
@canton7 canton7 changed the title FrozenOrThawed metaclass in new HA breaks entity descriptions HA 2024.1 introduces a breaking change Jan 3, 2024
@canton7 canton7 pinned this issue Jan 3, 2024
@emontnemery
Copy link

FWIW, the core weather integration does like this to meet the metaclass requirements:
https://github.com/joostlek/core/blob/0e807cd21315453d22ef79e892b5fceaddbe8b3e/homeassistant/components/weather/__init__.py#L264-L272

@emontnemery
Copy link

I think you can do like this:

class ModbusEntityMixinmeta(ABCCachedProperties, _ProtocolMeta):
    pass


class ModbusEntityMixin(
    ModbusControllerEntity,
    ModbusEntityProtocol,
    _ModbusEntityMixinBase,
    metaclass=ModbusEntityMixinmeta,
):
    ...

@Ric57100
Copy link

Ric57100 commented Jan 4, 2024

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:51:34.470 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration liveboxtvuhd 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:51:34.474 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration husqvarna_automower 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:51:34.478 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration livebox 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:51:34.481 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration espsomfy_rts 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:51:34.486 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration foxess_modbus 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:51:34.490 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration xiaomi_cloud_map_extractor 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:02.622 WARNING (MainThread) [homeassistant.const] DATA_RATE_MEGABITS_PER_SECOND was used from livebox, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfDataRate.MEGABITS_PER_SECOND instead, please create a bug report at https://github.com/cyr-ius/hass-livebox-component/issues
2024-01-04 08:52:02.633 WARNING (MainThread) [homeassistant.components.sensor] STATE_CLASS_MEASUREMENT was used from livebox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.MEASUREMENT instead, please create a bug report at https://github.com/cyr-ius/hass-livebox-component/issues
2024-01-04 08:52:02.642 WARNING (MainThread) [homeassistant.components.sensor] STATE_CLASS_MEASUREMENT was used from livebox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.MEASUREMENT instead, please create a bug report at https://github.com/cyr-ius/hass-livebox-component/issues
2024-01-04 08:52:07.271 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.11/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')

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
2024-01-04 08:52:09.857 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
2024-01-04 08:52:11.867 WARNING (MainThread) [homeassistant.const] TIME_MINUTES was used from husqvarna_automower, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTime.MINUTES instead, please create a bug report at https://github.com/Thomas55555/husqvarna_automower/issues
2024-01-04 08:52:12.866 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing component custom_components.foxess_modbus
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 822, in get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/config/custom_components/foxess_modbus/init.py", line 43, in
from .inverter_profiles import inverter_connection_type_profile_from_config
File "/config/custom_components/foxess_modbus/inverter_profiles.py", line 25, in
from .entities.charge_periods import CHARGE_PERIODS
File "/config/custom_components/foxess_modbus/entities/charge_periods.py", line 8, in
from .modbus_charge_period_config import ChargePeriodAddressSpec
File "/config/custom_components/foxess_modbus/entities/modbus_charge_period_config.py", line 13, in
from .modbus_binary_sensor import ModbusBinarySensorDescription
File "/config/custom_components/foxess_modbus/entities/modbus_binary_sensor.py", line 52, in
class ModbusBinarySensor(ModbusEntityMixin, BinarySensorEntity):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
2024-01-04 08:52:12.880 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'foxess_modbus': Unable to import component: Exception importing custom_components.foxess_modbus
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 822, in get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/config/custom_components/foxess_modbus/init.py", line 43, in
from .inverter_profiles import inverter_connection_type_profile_from_config
File "/config/custom_components/foxess_modbus/inverter_profiles.py", line 25, in
from .entities.charge_periods import CHARGE_PERIODS
File "/config/custom_components/foxess_modbus/entities/charge_periods.py", line 8, in
from .modbus_charge_period_config import ChargePeriodAddressSpec
File "/config/custom_components/foxess_modbus/entities/modbus_charge_period_config.py", line 13, in
from .modbus_binary_sensor import ModbusBinarySensorDescription
File "/config/custom_components/foxess_modbus/entities/modbus_binary_sensor.py", line 52, in
class ModbusBinarySensor(ModbusEntityMixin, BinarySensorEntity):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 251, in _async_setup_component
component = integration.get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 830, in get_component
raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing custom_components.foxess_modbus
2024-01-04 08:52:13.146 WARNING (SyncWorker_4) [websocket] websocket connected
2024-01-04 08:52:15.285 WARNING (MainThread) [homeassistant.helpers.entity] Entity camera.roborock_s7_camera (<class 'custom_components.xiaomi_cloud_map_extractor.camera.VacuumCamera'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <CameraEntityFeature.ON_OFF: 1>, please create a bug report at https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-04 08:52:15.483 ERROR (MainThread) [homeassistant.components.image] Error while setting up husqvarna_automower platform for image
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/husqvarna_automower/image.py", line 53, in async_setup_entry
entity_list.append(AutomowerImage(coordinator, idx, entry, hass))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/husqvarna_automower/image.py", line 94, in init
self._load_map_image()
File "/config/custom_components/husqvarna_automower/image.py", line 131, in _load_map_image
self._map_image = Image.open(map_image_path, "r").convert("RGBA")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/PIL/Image.py", line 3243, in open
fp = builtins.open(filename, "rb")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/config/custom_components/husqvarna_automower/resources/mower_map.png'
2024-01-04 08:52:16.869 ERROR (SyncWorker_8) [custom_components.liveboxtvuhd.client] HTTPConnectionPool(host='192.168.1.100', port=8080): Max retries exceeded with url: /remoteControl/cmd?operation=10 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f70b7abd0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2024-01-04 08:52:16.873 WARNING (MainThread) [homeassistant.helpers.entity] Entity media_player.tv_uhd_player_salon (<class 'custom_components.liveboxtvuhd.media_player.LiveboxTvUhdDevice'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <MediaPlayerEntityFeature.PAUSE|VOLUME_MUTE|PREVIOUS_TRACK|NEXT_TRACK|TURN_ON|TURN_OFF|VOLUME_STEP|SELECT_SOURCE|PLAY: 19897>, please report it to the author of the 'liveboxtvuhd' custom integration and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-04 08:52:16.938 ERROR (SyncWorker_1) [custom_components.liveboxtvuhd.client] HTTPConnectionPool(host='192.168.1.101', port=8080): Max retries exceeded with url: /remoteControl/cmd?operation=10 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6ee96750>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2024-01-04 08:52:16.943 WARNING (MainThread) [homeassistant.helpers.entity] Entity media_player.tv_uhd_player_chambre (<class 'custom_components.liveboxtvuhd.media_player.LiveboxTvUhdDevice'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <MediaPlayerEntityFeature.PAUSE|VOLUME_MUTE|PREVIOUS_TRACK|NEXT_TRACK|TURN_ON|TURN_OFF|VOLUME_STEP|SELECT_SOURCE|PLAY: 19897>, please report it to the author of the 'liveboxtvuhd' custom integration and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-04 08:52:17.248 WARNING (MainThread) [homeassistant.components.device_tracker] SOURCE_TYPE_ROUTER was used from livebox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SourceType.ROUTER instead, please create a bug report at https://github.com/cyr-ius/hass-livebox-component/issues
2024-01-04 08:52:17.260 WARNING (MainThread) [homeassistant.components.device_tracker] SOURCE_TYPE_ROUTER was used from livebox, this is a deprecated constant which will be removed in HA Core 2025.1. Use SourceType.ROUTER instead, please create a bug report at https://github.com/cyr-ius/hass-livebox-component/issues
2024-01-04 08:52:18.697 WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT entity name starts with the device name in your config {'unique_id': 'rpict_11_ReactPower9', 'name': 'RPICT 11 ReactPower9', 'state_topic': 'energy/11', 'value_template': Template<template=({{ value_json.ReactPower9 }}) renders=0>, 'device_class': <SensorDeviceClass.POWER: 'power'>, 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, 'unit_of_measurement': 'W', 'device': {'identifiers': ['11'], 'manufacturer': 'LeChacal', 'model': 'rpict_11', 'name': 'RPICT 11', 'connections': []}, 'payload_not_available': 'offline', 'availability_mode': 'latest', 'payload_available': 'online', 'encoding': 'utf-8', 'enabled_by_default': True, 'qos': 0, 'force_update': False}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'ReactPower9'
2024-01-04 08:52:18.706 WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT entity name starts with the device name in your config {'unique_id': 'rpict_11_ReactPower10', 'name': 'RPICT 11 ReactPower10', 'state_topic': 'energy/11', 'value_template': Template<template=({{ value_json.ReactPower10 }}) renders=0>, 'device_class': <SensorDeviceClass.POWER: 'power'>, 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, 'unit_of_measurement': 'W', 'device': {'identifiers': ['11'], 'manufacturer': 'LeChacal', 'model': 'rpict_11', 'name': 'RPICT 11', 'connections': []}, 'payload_not_available': 'offline', 'availability_mode': 'latest', 'payload_available': 'online', 'encoding': 'utf-8', 'enabled_by_default': True, 'qos': 0, 'force_update': False}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'ReactPower10'

@calum-mcfarlane
Copy link

Presumably the thing to do is just not upgrade HA until this is resolved, right?

@FozzieUK
Copy link
Contributor

FozzieUK commented Jan 4, 2024

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.

@vip-klaus
Copy link

The weatherlink-integration is also affected, while the viessmann-integration continues to work properly.

@muhkuh666
Copy link

Hi all
I have had an issue with the intergration after update to 2024.1.0 too. When will there be a fix?
BR

@canton7
Copy link
Collaborator Author

canton7 commented Jan 4, 2024

I was hoping to find time tonight but got stuck at work until late. Hopefully Saturday?

@ppetru
Copy link

ppetru commented Jan 6, 2024

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.

@muhkuh666
Copy link

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?

@martindell
Copy link

Nope :/ Still the same with 2024.1.1. Reverting ..

2024-01-06 08:38:41.719 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration foxess_modbus 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-06 08:40:05.871 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing component custom_components.foxess_modbus File "/config/custom_components/foxess_modbus/__init__.py", line 43, in <module> File "/config/custom_components/foxess_modbus/inverter_profiles.py", line 25, in <module> File "/config/custom_components/foxess_modbus/entities/charge_periods.py", line 8, in <module> File "/config/custom_components/foxess_modbus/entities/modbus_charge_period_config.py", line 13, in <module> File "/config/custom_components/foxess_modbus/entities/modbus_binary_sensor.py", line 52, in <module> 2024-01-06 08:40:05.885 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'foxess_modbus': Unable to import component: Exception importing custom_components.foxess_modbus File "/config/custom_components/foxess_modbus/__init__.py", line 43, in <module> File "/config/custom_components/foxess_modbus/inverter_profiles.py", line 25, in <module> File "/config/custom_components/foxess_modbus/entities/charge_periods.py", line 8, in <module> File "/config/custom_components/foxess_modbus/entities/modbus_charge_period_config.py", line 13, in <module> File "/config/custom_components/foxess_modbus/entities/modbus_binary_sensor.py", line 52, in <module> ImportError: Exception importing custom_components.foxess_modbus

@vip-klaus
Copy link

yes, same problem with 2024.1.1. Only the weatherlink integration is working again with 2024.1.1.

@FozzieUK
Copy link
Contributor

FozzieUK commented Jan 6, 2024

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.

@muhkuh666
Copy link

Is the new Version available on HACS already?

@soniiic
Copy link

soniiic commented Jan 6, 2024

Is the new Version available on HACS already?

Yeah it's on HACS now

@canton7
Copy link
Collaborator Author

canton7 commented Jan 6, 2024

This has been fixed in 1.8.1, which is available on HACS. Apologies for the delay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
10 participants