J. Nick Koston
6e628d2f06
Add a negative cache to the recorder event type manager ( #91770 )
2023-04-22 14:09:04 +02:00
J. Nick Koston
be5714e3fd
Use slots for recorder tasks to reduce memory ( #90387 )
2023-03-28 12:24:12 +02:00
J. Nick Koston
d49fbc17df
Fix recorder attribute excludes not being effective until after startup ( #90198 )
...
* Fix attribute excludes not being effective until after startup
fixes #90016
* reduce
2023-03-23 20:52:37 -04:00
J. Nick Koston
96225bb287
Rename recorder run_history to table_managers.recorder_runs_manager ( #90070 )
2023-03-21 18:38:33 -10:00
J. Nick Koston
c94b054d75
Retain history when renaming an entity_id ( #89963 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-03-19 17:33:21 -10:00
J. Nick Koston
b1f64de6ce
Remove the old ix_states_event_id index if its no longer being used ( #89901 )
...
* Remove the old ix_states_event_id index if its no longer being used
* cover it
* fixes
* fixup
* Update homeassistant/components/recorder/tasks.py
2023-03-17 20:27:33 -04:00
J. Nick Koston
dbb2706c76
Reduce number of tasks created by compiling missing statistics ( #89835 )
2023-03-16 21:07:14 -10:00
J. Nick Koston
b906d67c1e
Fix filtered purge not removing newer events ( #89721 )
2023-03-14 16:33:19 -10:00
J. Nick Koston
b9ac6b4a7c
Improve reliability of context id migration ( #89609 )
...
* Split context id migration into states and events tasks
Since events can finish much earlier than states we
would keep looking at the table because states as not
done. Make them seperate tasks
* add retry dec
* fix migration happening twice
* another case
2023-03-12 21:41:48 -04:00
J. Nick Koston
c41f91be89
Deduplicate entity_id in the states table ( #89557 )
2023-03-12 10:01:58 -10:00
J. Nick Koston
8bd43760b6
Deduplicate event_types in the events table ( #89465 )
...
* Deduplicate event_types in the events table
* Deduplicate event_types in the events table
* more fixes
* adjust
* adjust
* fix product
* fix tests
* adjust
* migrate
* migrate
* migrate
* more test fixes
* more test fixes
* fix
* migration test
* adjust
* speed up
* fix index
* fix more tests
* handle db failure
* preload
* tweak
* adjust
* fix stale docs strings, remove dead code
* refactor
* fix slow tests
* coverage
* self join to resolve query performance
* fix typo
* no need for quiet
* no need to drop index already dropped
* remove index that will never be used
* drop index sooner as we no longer use it
* Revert "remove index that will never be used"
This reverts commit 461aad2c52
.
* typo
2023-03-11 14:54:55 -05:00
J. Nick Koston
170a13302c
Reduce overhead to store context ids in the database ( #88942 )
2023-03-08 14:51:45 -10:00
J. Nick Koston
a9731a7b26
Make the recorder LRU adjustment threadsafe ( #88443 )
2023-02-19 19:30:08 +01:00
J. Nick Koston
abf0c87e40
Migrate statistics to use timestamp columns ( #87321 )
2023-02-09 12:24:19 -06:00
Franck Nijhof
c5dedb7a79
Code styling tweaks to the recorder integration ( #86030 )
2023-01-16 19:51:11 +01:00
J. Nick Koston
b8a1537b58
Improve performance of fetching and storing history and events with the database ( #84870 )
2023-01-02 13:26:08 -10:00
Erik Montnemery
b94e1e9ef8
Fire events when long term statistics is updated ( #82492 )
...
* Fire events when long term statistics is updated
* Allow the new events to be subscribed to by anyone
* Address review comments
* Finish renaming events
* Finish renaming events
* Fix do_adhoc_statistics
* Adjust tests
* Adjust tests
2022-11-24 22:01:36 +01:00
Erik Montnemery
2e261d5dc2
Allow specifying the target table when importing statistics ( #80230 )
...
Allow specifying the table when importing statistics
2022-10-14 08:32:19 +02:00
Erik Montnemery
bc2dffabc4
Improve naming of units used in statistics ( #79276 )
2022-09-30 08:38:44 +02:00
Erik Montnemery
c52d0f7495
Support converting statistics to another unit ( #79117 )
2022-09-27 08:44:58 +02:00
Erik Montnemery
dae00c70de
Allow selecting display unit when fetching statistics ( #78578 )
2022-09-20 17:43:57 -04:00
Erik Montnemery
fd6ffef52f
Support non-live database migration ( #72433 )
...
* Support non-live database migration
* Tweak startup order, add test
* Address review comments
* Fix typo
* Clarify comment about promoting dependencies
* Tweak
* Fix merge mistake
* Fix some tests
* Fix additional test
* Fix additional test
* Adjust tests
* Improve test coverage
2022-07-22 15:11:34 +02:00
Thibault Cohen
1d7d2875e1
Add websocket command recorder/import_statistics ( #73937 )
...
* Expose ws_add_external_statistics in websocket API
* Refactor
* Add tests
* Improve test coverage
Co-authored-by: Thibault Cohen <titilambert@users.noreply.github.com>
Co-authored-by: Erik <erik@montnemery.com>
2022-07-21 12:36:49 +02:00
Erik Montnemery
23bd64b7a2
Prevent duplication of statistics metadata ( #71637 )
...
* Prevent duplication of statistics metadata
* Add models_schema_28.py
* Handle entity renaming as a recorder job
* Improve tests
2022-05-24 15:34:46 +02:00
J. Nick Koston
9c3f949165
Add live streaming logbook websocket endpoint ( #72258 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-05-22 14:57:54 -05:00
J. Nick Koston
eb77f8db85
Complete strict typing for recorder ( #71274 )
...
* Complete strict typing for recorder
* update tests
* Update tests/components/recorder/test_migrate.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/recorder/test_migrate.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remove the asserts
* remove ignore comments
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-05-04 12:22:50 -05:00
J. Nick Koston
e30940ef2a
Move processing of recorder service call arguments into services.py ( #71260 )
2022-05-03 13:56:22 -07:00
J. Nick Koston
29bda196b5
Break apart recorder into tasks and core modules ( #71222 )
2022-05-02 21:53:56 -07:00