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

Compatibility issues with Home Assistant >= 2024 #61

Open
hartmood opened this issue Dec 28, 2023 · 13 comments
Open

Compatibility issues with Home Assistant >= 2024 #61

hartmood opened this issue Dec 28, 2023 · 13 comments

Comments

@hartmood
Copy link

hartmood commented Dec 28, 2023

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

  • HomeAssistant version [e.g. 2024.1]

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 hartmood changed the title CELSIUS was used from ideenergy, this is a deprecated constant which will be removed in HA Core 2025.1. CELSIUS was used from ideenergy, this is a deprecated constant which will be removed in HA Core 2024.1. Dec 28, 2023
@hartmood
Copy link
Author

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

@ldotlopez
Copy link
Owner

@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
Copy link
Author

It seems to work. Thank you.

@hartmood
Copy link
Author

hartmood commented Jan 1, 2024

@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
Copy link
Author

hartmood commented Jan 2, 2024

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
Copy link
Owner

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

@ldotlopez ldotlopez reopened this Jan 2, 2024
@ldotlopez ldotlopez changed the title CELSIUS was used from ideenergy, this is a deprecated constant which will be removed in HA Core 2024.1. Compatibility issues with Home Assistant >= 2024 Jan 2, 2024
@hartmood
Copy link
Author

hartmood commented Jan 2, 2024

@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
Copy link
Owner

@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
Copy link
Author

hartmood commented Jan 4, 2024

@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
Copy link
Owner

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

@javillor
Copy link

javillor commented Jan 6, 2024

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

@hartmood
Copy link
Author

hartmood commented Jan 8, 2024

@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:

  • Accumulated Consumption: Worked the whole time; the last data is shown in the lovelace standard dashboard
  • Historical Consumption: All data for the whole year is shown. No data or "unknown" is shown in the Lovelace standard dashboard
  • Historical Generation: No data at all. "unknown" in Lovelace standard dashboard
  • Historical Power Demand: Stopped on the 2nd of January when I switched to mains and did not come back with 2.1.1. "Unknown" is shown in the dashboard.
  • Instant Power Demand: Worked the whole time; the last data is shown in the lovelace standard dashboard

Bildschirmfoto 2024-01-08 um 12 30 01

@calentadorsolarpasoapaso

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants