ldotlopez / ha-ideenergy

ideenergy integration for home-assistant
GNU General Public License v3.0
73 stars 13 forks source link

Compatibility issues with Home Assistant >= 2024 #61

Open hartmood opened 8 months ago

hartmood commented 8 months ago

Describe the bug Logger: homeassistant.const Source: helpers/deprecation.py:204 First occurred: 09:41:26 (2 occurrences) Last logged: 09:41:26

TEMP_CELSIUS was used from ideenergy, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/ldotlopez/ha-ideenergy/issues TEMP_FAHRENHEIT was used from ideenergy, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.FAHRENHEIT instead, please create a bug report at https://github.com/ldotlopez/ha-ideenergy/issues

Environment

Additional context Logger: homeassistant.loader Source: loader.py:822 First occurred: 09:41:26 (1 occurrences) Last logged: 09:41:26

Unexpected exception importing component custom_components.ideenergy 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/ideenergy/init.py", line 43, in from .datacoordinator import DataSetType, IDeCoordinator File "/config/custom_components/ideenergy/datacoordinator.py", line 37, in from .entity import IDeEntity File "/config/custom_components/ideenergy/entity.py", line 29, in from homeassistant_historical_sensor.recorderutil import ( File "/usr/local/lib/python3.11/site-packages/homeassistant_historical_sensor/init.py", line 39, in raise SystemError(msg) SystemError: Running HomeAssistant 2024.1.0b0, Minimum required version >=2023.6.0

hartmood commented 8 months ago

@ldotlopez Thanks for fixing. How do I receive the update? There is no HACS update available.

ldotlopez commented 8 months ago

@hartmood I pushed a new release some minutes ago. This release also pulls major versions from ideenergy and historical-sensors, it may break (hopefully not) some setups, backup before upgrade

hartmood commented 8 months ago

It seems to work. Thank you.

hartmood commented 8 months ago

@ldotlopez I activated the historical sensors, but even after 72 hours, no data is shown. Do I have to deactivate the standard sensors to make the historical sensors work?

hartmood commented 8 months ago

Found this in my log file

File "/usr/local/lib/python3.11/site-packages/homeassistant_historical_sensor/patches.py", line 76, in _build_attributes extra_state_attributes = self.device_state_attributes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'HistoricalPowerDemand' object has no attribute 'device_state_attributes' 2024-01-02 01:18:28.541 ERROR (MainThread)

ldotlopez commented 8 months ago

@hartmood Can you test the 'main' version? It should pull a new version of historical-sensors and, hopefully, fix the problem

hartmood commented 8 months ago

@ldotlopez I would love to test the 'main' version. But which one exactly is it? I installed the version from 4 days ago. Should it be 2.1.0, then? Happy New Year, by the way, and thanks for supporting me.

ldotlopez commented 8 months ago

@hartmood If you're using HACS go to the integration page → click the 'three dots' → "Download again" In the dropdown you should see the "main" version, which is the latest unreleased code directly from git. Needless to say, it is important to make a backup beforehand.

@ldotlopez I would love to test the 'main' version. But which one exactly is it? I installed the version from 4 days ago. Should it be 2.1.0, then? Happy New Year, by the way, and thanks for supporting me.

You're more than welcome, you're testing a pre-release version of HomeAssistant and helping me to be ready to the next release. Thanks to you too.

hartmood commented 8 months ago

@ldotlopez I went straight to "main" (thanks for the help; I've struggled with OpenHab for many years, and I'm still missing a few tricks in hass), but since then, I haven't received any data for the three historical sensors. I had also wrongly assumed that I wasn't getting any data, but that wasn't the case. Only "unknown" is displayed in the dashboard for these three sensors, and data is then available in the chart. Yesterday, I went back from "main" to 2.1.0. Unfortunately, there is still no more data, the chart stops exactly at the time when I switched to "main".

I am happy to continue testing (although I work for a software company, my programming skills are unfortunately extremely limited).

ldotlopez commented 8 months ago

I just released the v2.1.1 version that solves, at least for me, the problem.

javillor commented 8 months ago

Just to confirm that after upgrading to versión 2.1.1 the problem got solved for me too

hartmood commented 8 months ago

@ldotlopez I switched at the beginning of the year from 2.1.0 to "mains" and then a couple of hours after release to 2.1.1. This is my status:

Bildschirmfoto 2024-01-08 um 12 30 01

calentadorsolarpasoapaso commented 5 months ago

This issue still there in main

TEMP_CELSIUS was used from ideenergy, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+ideenergy%22 TEMP_FAHRENHEIT was used from ideenergy, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.FAHRENHEIT instead, please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+ideenergy%22 Traceback (most recent call last): File "", line 189, in _run_module_as_main File "", line 148, in _get_module_details File "", line 112, in _get_module_details File "/home/homeassistant/.homeassistant/custom_components/ideenergy/init.py", line 43, in from .datacoordinator import DataSetType, IDeCoordinator File "/home/homeassistant/.homeassistant/custom_components/ideenergy/datacoordinator.py", line 37, in from .entity import IDeEntity File "/home/homeassistant/.homeassistant/custom_components/ideenergy/entity.py", line 29, in from homeassistant_historical_sensor.recorderutil import ( File "/home/homeassistant/lib/python3.12/site-packages/homeassistant_historical_sensor/init.py", line 44, in raise SystemError(msg) SystemError: Running HomeAssistant 2024.2.2, Minimum required version >=2023.6.0