Closed 50494554524F closed 2 years ago
breaking change
As suggested in the warning, I moved the DB access to the DB executor. I haven't tested this change yet.
@50494554524F, any chance you would want to test this by installing the unreleased version (latest commit on develop branch)?
perfectly working! no more errors or warnings... thanks
an addition... updating the integration using hacs i still get a warning
Detected integration that accesses the database without the database executor; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job() for faster database operations. Please report issue to the custom component author for var using this method at custom_components/var/__init__.py, line 436: result = self._session.execute(self._query)
while copying the init.py file i have no warnings...
Strange. Does this happen when you upgrade to v0.13.1 in HACS or the head of develop in HACS?
upgrading to 0.13.1 in hacs... tried to copy init.py only, the warning is still there... my configuration didn't change since last night
edit: test script works with no warnings. i'm investigating where my script gives the warning because last night didn't...
i was wrong about the warning... it appears only the first time i use .update after a reboot... the scripts work without errors, so it can be ignored (i think)
2022.5, simple test script
i get this warning
Detected integration that accesses the database without the database executor; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job() for faster database operations. Please report issue to the custom component author for var using this method at custom_components/var/__init__.py, line 433: result = self._session.execute(self._query)
upgrading to 2022.6 it stops working with errorDetected blocking call to _do_get_db_connection_protected inside the event loop. This is causing stability issues. Please report issue for recorder doing blocking calls at homeassistant/components/recorder/pool.py, line 75: check_loop(
andthanks
edit: forgot... same results if i pass the entity_id under data: