homeassistant-powercalc: Error after update to V 0.25
Hello,
I got this error after updating to the last version of powercalc and restart HA :
Logger: homeassistant.setup
Source: custom_components/powercalc/power_profile/library.py:132
Integration: Powercalc (documentation, issues)
First occurred: 08:11:06 (1 occurrences)
Last logged: 08:11:06
Error during setup of component powercalc
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/config/custom_components/powercalc/__init__.py", line 185, in async_setup
await autodiscover_entities(config, domain_config, hass)
File "/config/custom_components/powercalc/__init__.py", line 268, in autodiscover_entities
power_profile = await get_power_profile(
File "/config/custom_components/powercalc/power_profile/model_discovery.py", line 46, in get_power_profile
profile = await libary.get_profile(
File "/config/custom_components/powercalc/power_profile/library.py", line 82, in get_profile
profiles = await self.get_profiles_by_manufacturer(model_info.manufacturer)
File "/config/custom_components/powercalc/power_profile/library.py", line 119, in get_profiles_by_manufacturer
await self._create_power_profile(
File "/config/custom_components/powercalc/power_profile/library.py", line 132, in _create_power_profile
with open(model_json_path) as file:
FileNotFoundError: [Errno 2] No such file or directory: '/config/custom_components/powercalc/power_profile/../data/aqara/model.json'
I’m on home assistant v 2022.8.6
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 16 (9 by maintainers)
Nice, thanks for confirming. Will release v0.25.2 now.
@ralfbosz You have hit another bug in the same code which iterates the directory to check if a certain manufacturer/model exists. There seem to be an inconsistence in directory listing accross multiple OS’s (locally it’s working for me, but in Home Assistant OS it’s breaking). I will have another look tomorrow to fix it in the code.
This errors in the log still needs solving. There shouldn’t be any errors. COuld you please create a new issue for that? Thanks in advance.
Hi, I had the exact same issue in my installation and I can confirm that the change in #1024 fixes it for me.
Just found 30 minutes to have a quick look. Was unable to reproduce in my test Hass OS installation. But I made a change in #1024 which should hopefully resolve for you.
Can any of you install the master branch and verify?
can relate, don’t worry, work first! just wanted to add additional report.
tried twice. as of right now I’m “too afraid” to uninstall and make a clean install [don’t want to loose all sensor readings/history - I don’t know if they will re-attach after reinstall], but will investigate further when I’ll come back from work