hass-core/homeassistant/components/recorder
J. Nick Koston 4366f83ac8
Restore use of local timezone for MariaDB/MySQL in SQL integration (#91313)
* Use local timezone for recorder connection

The fix in #90335 had an unexpected side effect of
using UTC for the timezone since all recorder operations
use UTC. Since only sqlite much use the database executor
we can use a seperate connection pool which uses local time

This also ensures that the engines are disposed of
when Home Assistant is shutdown as previously we
did not cleanly disconnect

* coverage

* fix unclean shutdown in config flow

* tweaks
2023-04-12 20:24:55 -04:00
..
auto_repairs Add auto repairs for events schema (#90136) 2023-03-22 21:17:36 -04:00
history Avoid multiple round trips to the database for history API calls (#91193) 2023-04-11 22:38:23 -04:00
models Avoid multiple round trips to the database for history API calls (#91193) 2023-04-11 22:38:23 -04:00
system_health Rename recorder run_history to table_managers.recorder_runs_manager (#90070) 2023-03-21 18:38:33 -10:00
table_managers Rename recorder run_history to table_managers.recorder_runs_manager (#90070) 2023-03-21 18:38:33 -10:00
__init__.py Restore use of local timezone for MariaDB/MySQL in SQL integration (#91313) 2023-04-12 20:24:55 -04:00
backup.py
const.py Fix recorder attribute excludes not being effective until after startup (#90198) 2023-03-23 20:52:37 -04:00
core.py Reduce overhead of legacy database columns on new installs (#90246) 2023-04-10 10:08:46 -04:00
db_schema.py Reduce overhead of legacy database columns on new installs (#90246) 2023-04-10 10:08:46 -04:00
entity_registry.py Retain history when renaming an entity_id (#89963) 2023-03-19 17:33:21 -10:00
executor.py
filters.py Rework recorder filters to avoid caching mistakes (#90419) 2023-03-28 22:51:46 +02:00
manifest.json Bump sqlalchemy to 2.0.9 (#91151) 2023-04-10 10:01:49 -04:00
migration.py Reduce overhead of legacy database columns on new installs (#90246) 2023-04-10 10:08:46 -04:00
pool.py Update typing on recorder pool for sqlalchemy 2.0 (#91244) 2023-04-13 00:09:15 +02:00
purge.py Rename recorder run_history to table_managers.recorder_runs_manager (#90070) 2023-03-21 18:38:33 -10:00
queries.py Fix entity_id migration query failing with MySQL 8.0.30 (#90895) 2023-04-06 10:34:13 +02:00
repack.py
services.py Add keep_days to recorder.purge_entities (#89726) 2023-03-15 11:13:47 -10:00
services.yaml Add keep_days to recorder.purge_entities (#89726) 2023-03-15 11:13:47 -10:00
statistics.py Cleanup some duplicate code in recorder statistics (#90549) 2023-04-01 21:40:14 -04:00
strings.json
tasks.py Use slots for recorder tasks to reduce memory (#90387) 2023-03-28 12:24:12 +02:00
util.py Call sqlite pragma optimize during periodic cleanup task (#91245) 2023-04-11 22:39:19 -04:00
websocket_api.py Avoid database executor job to fetch statistic metadata on cache hit (#89960) 2023-03-19 22:01:16 -04:00