better_thermostat
better_thermostat copied to clipboard
integration accesses the database without the database executor
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(
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
This issue has been automatically marked as stale because it has not had recent activity.
Fixed