KartoffelToby / better_thermostat

This custom component for Home Assistant will add crucial features to your climate-controlling TRV (Thermostatic Radiator Valves) to save you the work of creating automations to make it smart. It combines a room-temperature sensor, window/door sensors, weather forecasts, or an ambient temperature probe to decide when it should call for heat and automatically calibrate your TRVs to fix the imprecise measurements taken in the radiator's vicinity.
https://better-thermostat.org
GNU Affero General Public License v3.0
813 stars 125 forks source link

[v1.6.0] on [2024.11.0b0] Unable to load integration #1428

Closed pdsccode closed 1 hour ago

pdsccode commented 4 hours ago

Prerequisites

Description

After updating HA Core to 2024-11-0b0, the integration for Better Thermostat couldn't be loaded anymore. Log in Additional Information.

Steps to Reproduce

  1. Update HA core to 2024.11.0b0
  2. Reboot

Expected behavior:

Integration loads

Actual behavior:

Integration cannot load. Error gets thrown

Versions

HA Core 2024.11.0b0 BT 1.6.0

Additional Information

2024-10-31 06:48:16.170 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'better_thermostat': Unable to import component: cannot import name 'Config' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 1011, in async_get_component comp = await self.hass.async_add_import_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 1071, in _get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1387, in _gcd_import File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 935, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 995, in exec_module File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "/config/custom_components/better_thermostat/__init__.py", line 6, in <module> from homeassistant.core import HomeAssistant, Config ImportError: cannot import name 'Config' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py). Did you mean: 'config'? During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 334, in _async_setup_component component = await integration.async_get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 1031, in async_get_component self._component_future.result() File "/usr/src/homeassistant/homeassistant/loader.py", line 1023, in async_get_component comp = self._get_component() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 1071, in _get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1387, in _gcd_import File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 935, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 995, in exec_module File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "/config/custom_components/better_thermostat/__init__.py", line 6, in <module> from homeassistant.core import HomeAssistant, Config ImportError: cannot import name 'Config' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py). Did you mean: 'config'?

pbranly commented 4 hours ago

Hi Same issue on my side I had to come back to October version Phi

pdsccode commented 3 hours ago

Rolled back to 2024.10.4 for now as well. As it also happens with another integration (frigate), it could be something with HA core as well. So I am leaving this here FIY. Will try again with 2024.11.0b1 when it's ready.

pdsccode commented 1 hour ago

Issue originated from HA core. Fixed in home-assistant/core#129537

tjorim commented 2 minutes ago

Please reopen, it's a containment, not fix.