ha-solcast-solar: Upgrade to HomeAssistant 2022.6 beta release breaks SolCast

After upgrade to the next beta SolCast breaks: https://rc.home-assistant.io/blog/2022/05/25/release-20226/

This error originated from a custom integration.

Logger: custom_components.solcast_solar
Source: custom_components/solcast_solar/__init__.py:492
Integration: Solcast PV Forecast (documentation, issues)
First occurred: 7:44:57 AM (3 occurrences)
Last logged: 7:44:57 AM

get_forecast_sensor_state: Traceback (most recent call last): File "/config/custom_components/solcast_solar/__init__.py", line 432, in get_forecast_sensor_state event_s: list[int] = [event.event_data for event in events] File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2896, in __iter__ return self._iter().__iter__() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2903, in _iter result = self.session.execute( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1695, in execute conn = self._connection_for_bind(bind) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1536, in _connection_for_bind return self._transaction._connection_for_bind( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 747, in _connection_for_bind conn = bind.connect() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/future/engine.py", line 406, in connect return super(Engine, self).connect() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3234, in connect return self._connection_cls(self, close_with_result=close_with_result) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 96, in __init__ else engine.raw_connection() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3313, in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3280, in _wrap_pool_connect return fn() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 382, in connect return _ConnectionFairy._checkout(self, self._fairy) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 868, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 476, in checkout rec = pool._do_get() File "/usr/src/homeassistant/homeassistant/components/recorder/pool.py", line 75, in _do_get check_loop( File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in check_loop raise RuntimeError( RuntimeError: Blocking calls must be done in the executor or a separate thread; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job(); at homeassistant/components/recorder/pool.py, line 75: check_loop(
get_forecast_sensor_state: Traceback (most recent call last): File "/config/custom_components/solcast_solar/__init__.py", line 482, in get_forecast_sensor_state event_s: list[int] = [event.event_data for event in events] File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2896, in __iter__ return self._iter().__iter__() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2903, in _iter result = self.session.execute( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1695, in execute conn = self._connection_for_bind(bind) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1536, in _connection_for_bind return self._transaction._connection_for_bind( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 747, in _connection_for_bind conn = bind.connect() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/future/engine.py", line 406, in connect return super(Engine, self).connect() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3234, in connect return self._connection_cls(self, close_with_result=close_with_result) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 96, in __init__ else engine.raw_connection() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3313, in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3280, in _wrap_pool_connect return fn() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 382, in connect return _ConnectionFairy._checkout(self, self._fairy) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 868, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 476, in checkout rec = pool._do_get() File "/usr/src/homeassistant/homeassistant/components/recorder/pool.py", line 75, in _do_get check_loop( File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in check_loop raise RuntimeError( RuntimeError: Blocking calls must be done in the executor or a separate thread; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job(); at homeassistant/components/recorder/pool.py, line 75: check_loop(
get_forecast_sensor_state: Traceback (most recent call last): File "/config/custom_components/solcast_solar/__init__.py", line 457, in get_forecast_sensor_state event_s: list[int] = [event.event_data for event in events] File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2896, in __iter__ return self._iter().__iter__() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2903, in _iter result = self.session.execute( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1695, in execute conn = self._connection_for_bind(bind) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1536, in _connection_for_bind return self._transaction._connection_for_bind( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 747, in _connection_for_bind conn = bind.connect() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/future/engine.py", line 406, in connect return super(Engine, self).connect() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3234, in connect return self._connection_cls(self, close_with_result=close_with_result) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 96, in __init__ else engine.raw_connection() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3313, in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3280, in _wrap_pool_connect return fn() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 382, in connect return _ConnectionFairy._checkout(self, self._fairy) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 868, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 476, in checkout rec = pool._do_get() File "/usr/src/homeassistant/homeassistant/components/recorder/pool.py", line 75, in _do_get check_loop( File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in check_loop raise RuntimeError( RuntimeError: Blocking calls must be done in the executor or a separate thread; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job(); at homeassistant/components/recorder/pool.py, line 75: check_loop(

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 53 (18 by maintainers)

Most upvoted comments

all good things are coming along Screen Shot 2022-06-08 at 3 53 35 pm

who wants to beta test it out?

It’s all changed for the next release

But no since it only does a get every hour it would not slow anything down at all

v3.0.3 beta is out… fixes a few things and made some changes and added the “forecast remaining today” sensor

@oziee HACS -> Integrations -> Solcast -> Three dots -> Redownload -> Enable beta -> Select 3.0.0_beta image

https://github.com/oziee/ha-solcast-solar/releases/tag/v3.0.0

will have to delete the current integration as its all totally different

Does the non beta 2022.6 also break the integration? It stopped working for me yesterday. Around the same time as I updated to 2022.6 HA Core…

It appears that it does, i reconfigured to be sure and same thing.