better_thermostat icon indicating copy to clipboard operation
better_thermostat copied to clipboard

integration accesses the database without the database executor

Open HA-TB303 opened this issue 2 years ago • 2 comments

Home Assistant Core 2022.5.1 log:

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 ai_thermostat using this method at custom_components/ai_thermostat/climate.py, line 802: history_list = history.state_changes_during_period(

HA-TB303 avatar May 06 '22 06:05 HA-TB303

Accessing the database from the event loop will raise an exception in 2022.6 https://github.com/home-assistant/core/pull/71547

It looks like this code needs to be adjusted here: https://github.com/KartoffelToby/better_thermostat/blob/master/custom_components/better_thermostat/weather.py#L120

bdraco avatar May 08 '22 21:05 bdraco

This issue has been automatically marked as stale because it has not had recent activity.

stale[bot] avatar Jul 07 '22 22:07 stale[bot]

Fixed

KartoffelToby avatar Sep 13 '22 16:09 KartoffelToby