Closed Thunderbird1982 closed 9 months ago
Hey, thanks for the report. For sure, I will fix that 👍
Would it be possivle that you test the chances when I make them?
Hi,
I got the same log. So if you need somebody to test it, I can support :)
Hi @patricknitsch and @Thunderbird1982
I have created the fix at branch fix_issue_15
.
The easiest way to test it is to replace the content of the file const.py
- you can find it here: https://github.com/sla89/hassio-kostal-piko/blob/fix_issue_15/custom_components/kostal_piko/const.py
Waiting for your feedback before creating a new release.
Thank you.
I tested it. I didn't get a warning, but a fault. See my log below.
Logger: homeassistant.loader Source: loader.py:842 First occurred: 00:29:24 (1 occurrences) Last logged: 00:29:24
Unexpected exception importing platform custom_components.kostal_piko.sensor
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 "
Is there anything missing?
Ahh forgot to import UnitOfElectricCurrent.
I have updated the const.py file. Can you please give it another try?
Thank you for the fast feedback!
I added it in my file. "UnitOfEnergy" was also missing. Now it works. I got no error.
Sorry 🙈 I was too tired I guess 🙈 Thank you for testing. I will make the changes in the evening and create a new release
No Problem. Thank you as well for your work. Glad I could help :)
@patricknitsch can you maybe give the const.py of my branch another try, please? If it is now working I will create the release. Thank you.
It works now! Good Job!
Thank you. Release v1.20 is now available
thank you for the fix works perfect
Logger: homeassistant.const Source: helpers/deprecation.py:204 First occurred: 13:18:59 (7 occurrences) Last logged: 13:18:59
POWER_KILO_WATT was used from kostal_piko, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.KILO_WATT ELECTRIC_POTENTIAL_VOLT was used from kostal_piko, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfElectricPotential.VOLT TIME_HOURS was used from kostal_piko, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTime.HOURS
ELECTRIC_CURRENT_AMPERE was used from kostal_piko, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfElectricCurrent.AMPERE
FREQUENCY_HERTZ was used from kostal_piko, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfFrequency.HERTZ
thanks Adrian