mrspouse
5c52e865a0
Correct spelling of BloodGlucoseConcentrationConverter ( #130449 )
...
* Correct spelling of BloodGlucoseConcentrationConverter
* Correct spelling of BloodGlucoseConcentrationConverter
2024-11-12 21:48:42 +01:00
epenet
906bdda6fa
Use report_usage in integrations ( #130366 )
2024-11-11 20:09:26 +01:00
Erik Montnemery
0cc50bc7bc
Fix copy-paste error in STATISTIC_UNIT_TO_UNIT_CONVERTER ( #130375 )
2024-11-11 11:09:06 -06:00
epenet
25fb70f281
Add blood glucose concentration device class ( #129340 )
2024-11-09 11:29:24 +01:00
Erik Montnemery
db5cb6233c
Correct condition signalling non-live DB migration is in progress ( #129464 )
2024-10-29 12:26:52 -10:00
Erik Montnemery
d8b618f7c3
Remove support for live recorder data migration of context ids ( #125309 )
2024-10-26 07:19:03 +02:00
J. Nick Koston
db494de809
Restore __slots__ to core objects ( #127441 )
2024-10-03 22:23:47 +02:00
J. Nick Koston
0f29fd3e10
Switch to using fast cached_property implementation in propcache ( #127339 )
2024-10-03 13:11:02 -05:00
Erik Montnemery
3f1acdc9ec
Make recorder WS command recorder/clear_statistics wait ( #127120 )
2024-10-02 10:43:40 +02:00
Erik Montnemery
2a2af01d12
Make recorder WS command recorder/update_statistics_metadata wait ( #127179 )
2024-10-02 09:56:36 +02:00
J. Nick Koston
e87542e091
Fix removing nulls when encoding events for PostgreSQL ( #127053 )
2024-09-30 09:01:41 +02:00
Jan Bouwhuis
60e3a1fc5f
Fix ruff import validation ( #126917 )
2024-09-27 15:17:54 +02:00
Erik Montnemery
66ab90b518
Add EntityIDPostMigration data migrator class ( #125307 )
2024-09-27 14:58:34 +02:00
Erik Montnemery
771575cfc5
Make statistics validation create issue registry issues ( #122595 )
...
* Make statistics validation create issue registry issues
* Disable creating issue about outdated MariaDB version in tests
* Use call_soon_threadsafe instead of run_callback_threadsafe
* Update tests
* Fix flapping test
* Disable creating issue about outdated SQLite version in tests
* Implement agreed changes
* Add translation strings for issue titles
* Update test
2024-09-25 11:11:11 +02:00
Erik Montnemery
ba5f1ac2a9
Bump version of recorder context ID data migrators ( #125293 )
2024-09-24 13:45:37 +02:00
epenet
bb5640b41b
Simplify imports in recorder ( #126248 )
2024-09-19 21:43:21 -04:00
Alberto Montes
b2401bf2e3
Update string formatting to use f-string on components ( #125987 )
...
* Update string formatting to use f-string on components
* Update code given review feedback
* Use f-string
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-09-19 11:38:25 +02:00
Erik Montnemery
dd4f1a0d0f
Simplify recorder statistics_meta_manager ( #125648 )
2024-09-10 21:00:06 +02:00
Erik Montnemery
bde92b34dd
Remove recorder history queries for database schemas < 31 ( #125652 )
2024-09-10 19:26:19 +02:00
Erik Montnemery
99122fcb78
Remove recorder history queries for database schemas < 25 ( #125649 )
2024-09-10 12:43:08 +02:00
Erik Montnemery
09989e6184
Fix UnboundLocalError in recorder ( #125419 )
2024-09-06 17:14:25 +02:00
Erik Montnemery
86ae70780c
Refactor recorder retryable_database_job decorator ( #125306 )
2024-09-05 13:09:27 +02:00
Erik Montnemery
984eba809c
Simplify generic decorators in recorder ( #125301 )
...
* Simplify generic decorators in recorder
* Remove additional case
2024-09-05 10:16:44 +02:00
Erik Montnemery
a8f2204f4f
Teach recorder data migrator base class to update MigrationChanges ( #125214 )
...
* Teach recorder data migrator base class to update MigrationChanges
* Bump migration version
* Improve test coverage
* Update migration.py
* Revert migrator version bump
* Remove unneeded change
2024-09-05 08:56:18 +02:00
Erik Montnemery
8fd691be69
Teach recorder data migrator base class to remove index ( #125168 )
...
* Teach recorder data migrator base class to remove index
* Fix tests
2024-09-04 09:52:41 +02:00
Erik Montnemery
7fc0e36b2f
Move recorder EntityIDPostMigrationTask to migration ( #125136 )
...
* Move recorder EntityIDPostMigrationTask to migration
* Update test
2024-09-04 08:38:46 +02:00
Erik Montnemery
cc3d059783
Refactor recorder EventIDPostMigration data migrator ( #125126 )
2024-09-03 22:37:50 +02:00
Erik Montnemery
7c223db1d5
Remove recorder PostSchemaMigrationTask ( #125076 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-03 07:51:27 +02:00
Erik Montnemery
fbfd8c48aa
Remove unused event from recorder ( #125067 )
2024-09-02 13:33:51 +02:00
dontinelli
659d135fca
Add ConductivityConverter in websocket_api.py ( #125029 )
2024-09-01 21:02:32 +02:00
Erik Montnemery
7bb93d4f3e
Deduplicate warning messages in recorder DB migration ( #124845 )
2024-08-29 19:05:27 -07:00
Erik Montnemery
1a2d013c97
Update icons.json to new service schema part 3 ( #124770 )
2024-08-28 13:48:01 +02:00
J. Nick Koston
0d2f22838a
Reduce complexity of _sorted_statistics_to_dict ( #123936 )
...
* comp stats queries
* tweak
* reduce
2024-08-27 11:22:10 +02:00
J. Nick Koston
4bc19876ca
Small speed up to creating stats database rows ( #124587 )
...
* Small speed up to creating stats database rows
Calling .timestamp() directly is faster on new cpython
* more cleanup
2024-08-27 11:18:12 +02:00
Erik Montnemery
b9aaba0432
Prevent duplicating constraints during schema migration ( #124616 )
2024-08-26 08:35:54 -10:00
J. Nick Koston
70fc8fa2eb
Improve performance of fetching stats metadata ( #124428 )
2024-08-25 18:33:21 +02:00
J. Nick Koston
2bb4a8747c
Bump fnv-hash-fast to 1.0.2 ( #124489 )
2024-08-24 06:58:52 +02:00
J. Nick Koston
7579ebc02a
Replace statistics _get_unit_class function with a dict lookup ( #124452 )
2024-08-22 21:14:31 -05:00
J. Nick Koston
6f66f37fc7
Shutdown database engine before waiting for executor shutdown ( #117339 )
...
* Close database connection before stopping the executor
related issue #117004
* Close database connection before waiting for database executor to finish
related issue #117004
* fix test
* fix
* drop unused arg
* Revert "drop unused arg"
This reverts commit 8a9fe6a24a
.
* docstring
* comment
2024-08-22 16:47:22 +02:00
Erik Montnemery
a7bca9bcea
Use BIGINT SQL type for ID columns ( #123973 )
...
Redo recorder ID migration from INT to BIGINT
2024-08-17 11:01:14 +02:00
Erik Montnemery
64a68b17f4
Simplify recorder.migration._drop_foreign_key_constraints ( #123968 )
2024-08-15 11:58:52 -05:00
Erik Montnemery
f72d9a2c02
Raise on database error in recorder.migration._modify_columns ( #123642 )
...
* Raise on database error in recorder.migration._modify_columns
* Improve test coverage
2024-08-15 14:46:23 +02:00
Erik Montnemery
72e235ad9f
Improve some comments in recorder migration code ( #123969 )
2024-08-15 10:56:56 +02:00
Erik Montnemery
667414a457
Raise on database error in recorder.migration._drop_foreign_key_constraints ( #123645 )
...
* Raise on database error in recorder.migration._drop_foreign_key_constraints
* Fix test
* Fix test
* Revert "Fix test"
This reverts commit 940b8cb506e912826d43d09d7697c10888bdf685.
* Update test
* Improve test coverage
* Disable test for SQLite
2024-08-15 08:25:18 +02:00
Erik Montnemery
e6ed3c8c5c
Raise on database error in recorder.migration function ( #123644 )
...
* Raise on database error in recorder.migration._update_states_table_with_foreign_key_options
* Improve test coverage
* Fix test
* Fix test
2024-08-14 22:37:23 +02:00
Erik Montnemery
9c4677a3c6
Add comment clarifying recorder migration to schema version 16 ( #123902 )
2024-08-14 14:22:06 -05:00
Erik Montnemery
e050d187c4
Clarify SQLite can't drop foreign key constraints ( #123898 )
2024-08-14 07:04:53 -05:00
Erik Montnemery
80f5683cd6
Raise on database error in recorder.migration._add_constraint ( #123646 )
...
* Raise on database error in recorder.migration._add_constraint
* Fix test
2024-08-14 13:59:06 +02:00
Erik Montnemery
b7bbc938d3
Drop violating rows before adding foreign constraints in DB schema 44 migration ( #123454 )
...
* Drop violating rows before adding foreign constraints
* Don't delete rows with null-references
* Only delete rows when integrityerror is caught
* Move restore of dropped foreign key constraints to a separate migration step
* Use aliases for tables
* Update homeassistant/components/recorder/migration.py
* Update test
* Don't use alias for table we're deleting from, improve test
* Fix MySQL
* Update instead of deleting in case of self references
* Improve log messages
* Batch updates
* Add workaround for unsupported LIMIT in PostgreSQL
* Simplify
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-08-14 09:31:37 +02:00
epenet
e64ca7c274
Enable implicit-return (RET503) rule in ruff ( #122771 )
2024-08-12 10:04:16 +02:00