Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detected unsafe call not in recorder thread #231

Closed
d4icon opened this issue Apr 15, 2024 · 0 comments
Closed

Detected unsafe call not in recorder thread #231

d4icon opened this issue Apr 15, 2024 · 0 comments
Assignees
Labels
wip Work in progress

Comments

@d4icon
Copy link

d4icon commented Apr 15, 2024

Desde que me cambie de comercializadora el dia 3 de Abril no me obtiene los datos.
En datadis estan, y puedo verlos.

Inteto hacer recreation_statistic y me aparece este error:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/edata/coordinator.py", line 127, in _async_update_data
await self.statistics.clear_all_statistics()
File "/config/custom_components/edata/stats.py", line 162, in clear_all_statistics
await get_db_instance(self.hass).async_add_executor_job(
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 726, in clear_statistics
instance.statistics_meta_manager.delete(session, statistic_ids)
File "/usr/src/homeassistant/homeassistant/components/recorder/table_managers/statistics_meta.py", line 330, in delete
self._assert_in_recorder_thread()
File "/usr/src/homeassistant/homeassistant/components/recorder/table_managers/statistics_meta.py", line 124, in _assert_in_recorder_thread
raise RuntimeError("Detected unsafe call not in recorder thread")
RuntimeError: Detected unsafe call not in recorder thread

Alguna sugerencia?

@uvejota uvejota added the wip Work in progress label Jul 15, 2024
@uvejota uvejota self-assigned this Jul 15, 2024
uvejota added a commit that referenced this issue Aug 12, 2024
* Fix float coerce in input settings

* Fix recreate statistics service

* New websockets API

* Fix error when entering floats in prices config_flow

* Improve statistics recreation to avoid loss of old data

* Implement new websockets api to directly fetch statistics from HA "long term statistics"

* Fix some styling issues

* Include surplus energy to statistics

* Add lovelace to manifest

* Add edata-card

* Update docs

* Fix entry removal/unload

* Remove old deprecated code and implement device/entity logic

* Restore some outdated code and explode attributes to different sensors

* Code simplification

* Adding new config flow options

* Fix translations

* Update edata backend

* Restoring debug functionality in options config_flow

* Adding migration function for new storage strategy

* Add billing simulation at options config_flow

* Rewrite history on billing options changes

* Fix #214 #210 #215 #198 #199 #223 #231 #233 #235 #207 #204
@uvejota uvejota closed this as completed Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Work in progress
Projects
None yet
Development

No branches or pull requests

2 participants