Closed tjorim closed 2 months ago
Home Assistant Core release 2023.04
1.5.5
All previous releases before 2024.04
Home Assistant Core 2024.4.0 Supervisor 2024.03.1 Operating System 12.1 Frontend 20240403.1
Updatting to the 2024.04 release version immediately broke the integration. Similar/same error as described above for the 2024.04 beta release.
From the Developer tools page the following error shows under Check and Restart:
Configuration warnings Platform error 'binary_sensor' from integration 'car_wash' - cannot import name 'ATTR_FORECAST' from 'homeassistant.components.weather' (/usr/src/homeassistant/homeassistant/components/weather/init.py)
As a quick troubleshooting attempt I changed my config to point to an alternate forecast sensor but it did not change the error.
No errors in log, no errors on Developer tools page, Car Wash sensor updates same as before update to 2024.04
The full error from the log is below (and looks same as previously mentioned error above other than the line numbers being off by a few lines). The error below is from the log after a successful update to the HA release version 2024.04.
Logger: homeassistant.config Source: config.py:1437
Platform error: binary_sensor - cannot import name 'ATTR_FORECAST' from 'homeassistant.components.weather' (/usr/src/homeassistant/homeassistant/components/weather/init.py)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 1437, in _async_load_and_validate_platform_integration
platform = await p_integration.integration.async_get_platform(domain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1070, in async_get_platform
platforms = await self.async_get_platforms((platform_name,))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1145, in async_get_platforms
import_future.result()
File "/usr/src/homeassistant/homeassistant/loader.py", line 1133, in async_get_platforms
platforms.update(self._load_platforms(platform_names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1060, in _load_platforms
platform_name: self._load_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1232, in _load_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "
See also #128
Having this same issue.
Same here with 2024.4.1
Same here with 2024.4.1
Here too.
This is why it is broken:
Weather
The previously deprecated forecast attribute of weather entities, has now been removed. Use the weather.get_forecasts service to get the forecast data instead.
NEEDS TO CHANGE: line 19 binary_sensor.py
from homeassistant.components.weather import ( GET_FORECASTS,
and line 160 binary_sensor.py
forecast = wdata.attributes.get(GET_FORECASTS)
WHAT it needs to change to, I have no clue. According to the release notes it should allow you to pull the info by using weather.get_forcasts, but I have no idea how to convert that from yaml to (I believe) Python? (Novice coder)
Hi,
I've just create a PR #131, fix is working in my instance, but i'm not sure at all, if this is the right approach... Thank you @Pronown, that were the right hints.
fixed
Environment
Describe the bug After updating HA to 2023.4 the integration does not load anymore.
Steps to Reproduce Update to HA core April beta release.
Expected behavior Integration still works.
Debug log