Open aherbjornsen opened 6 months ago
Thanks for the heads up! Can you try with the latest beta and see if it works now? I don't have much time and energy to maintain this repo at the moment, but this seemed kinda urgent
Thanks for the fast response.
I installed 1.5.3 beta, and the errors reported have disappeared
But the integration does not seem to load and I see this during startup:
2024-05-01 21:24:05.370 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry priceanalyzerOslo for priceanalyzer
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 575, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/priceanalyzer/__init__.py", line 270, in async_setup_entry
res = await _dry_setup(hass, entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/priceanalyzer/__init__.py", line 235, in _dry_setup
data = Data(
^^^^^
File "/config/custom_components/priceanalyzer/data.py", line 172, in __init__
self._multiply_template = cv.template(self._multiply_template)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/config_validation.py", line 664, in template
raise vol.Invalid("template value should be a string")
voluptuous.error.Invalid: template value should be a string
I think this is a bug related to updating to above 1.5 (the betas). Could you try to click "Configure" for the integration, and save it (no changes necessary) from /config/integrations/integration/priceanalyzer ? The new multiply-template seems to cause some issues, and the "default when nothing is provided" fails.
Yes, that worked. Now the integration is back up again and seems to be working fine. Thanks again!
Similar problem with 2024.5.2, but latest beta + reconfigure (and restart HA) solved the problem.
FWIW I still see asyncio related warning from priceanalyzer, using HA 2024.7.2:
2024-07-24 08:37:49.304 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/pytz/zoneinfo/Europe/Stockholm', 'rb') inside the event loop by custom integration 'priceanalyzer' at custom_components/priceanalyzer/init.py, line 207: tz=timezone("Europe/Stockholm"), (offender: /usr/local/lib/python3.12/site-packages/pytz/init.py, line 108: return open(filename, 'rb')), please create a bug report at https://github.com/erlendsellie/priceanalyzer/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open
Version of the custom_component
1.5
Homeassistant version
2024.5.0b4
Describe the bug
Integration throws warnings and runtime errors related to 'async_write_ha_state' in latest HA beta release.
Debug log