Climate issue 2024.1
Closed this issue · 4 comments
Hi, since 2024.1 the following issue is showing on startup:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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/magic_areas/climate.py", line 44, in <module> TARGET_TEMPERATURE | TARGET_TEMPERATURE_RANGE | PRESET_MODE ^^^^^^^^^^^^^^^^^^ NameError: name 'TARGET_TEMPERATURE' is not defined
this issue came up because of https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
Additionally, also this error messages come up in 2024.1, maybe due to same or similar reasons:
- TEMP_CELSIUS was used from magic_areas, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead
- TEMP_FAHRENHEIT was used from magic_areas, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.FAHRENHEIT instead
Fix here: #298
Based on: daenny/climate_group#67 (comment)
Merged #298, coming up on next release. Unfortunately master is a bit polluted with other changes and I'm not smart enough to cherrypick after the mess I've made so no hotfix release!
Meanwhile you can download the climate.py and overwrite the one in your custom_components/magic_areas folder