https://www.sqlite.org/pragma.html#pragma_optimize
> To achieve the best long-term query performance without the need to do a detailed engineering analysis of the application schema and SQL, it is recommended that applications run "PRAGMA optimize" (with no arguments) just before closing each database connection. Long-running applications might also benefit from setting a timer to run "PRAGMA optimize" every few hours.
> This pragma is usually a no-op or nearly so and is very fast.
Since we keep the recorder connection open for the entire time HA
is running we fall into the long-running application bucket
* delete more code
* tweak
* tweak
* wrappers
* restore lost performance
* restore lost performance
* restore lost performance
* compact
* reduce
* fix refactor
* DRY
* tweak
* delete the start time state injector
* move away the legacy code
* tweak
* adjust
* adjust
* tweak
* ignore impossible
* fix a bug where the first start was changed to the start time when there was no previous history recorded before
* avoid the empty scan most cases
* postgresql
* fixes
* workaround for mariadb < 10.4
* remove unused
* remove unused
* adjust
* bail early
* tweak
* tweak
* fix more tests
* fix recorderrun being init in the future in the test
* run history tests on schema 30 as well
* Revert "run history tests on schema 30 as well"
This reverts commit d798b100ac.
* reduce
* cleanup
* tweak
* reduce
* prune
* adjust
* adjust
* adjust
* reverse later is faster because the index is in forward order and the data size we are reversing is much smaller even if we are in python code
* Revert "reverse later is faster because the index is in forward order and the data size we are reversing is much smaller even if we are in python code"
This reverts commit bf974e103e.
* fix test
* Revert "Revert "reverse later is faster because the index is in forward order and the data size we are reversing is much smaller even if we are in python code""
This reverts commit 119354499e.
* more coverage
* adjust
* fix for table order
* impossible for it to be missing
* remove some more legacy from the all states
* Media playback working
* Working on OPUS audio
* Before rollback
* Fix is_end
* First working pipeline
* Clean up
* Remove asserts
* Send HA version in SDP
* Use async_pipeline_from_audio_stream
* Use config flow with allowed IP
* Satisfy ruff
* Remove use of regex for SIP IP
* Use voip-utils
* Fix imports
* Add Pipeline to __all__
* Fix voice assistant tests
* Basic VoIP test
* Run hassfest
* Generate requirements
* Bump voip utils (missing requirement)
* Allow tts_options to be passed in to pipeline run
* Add config flow tests
* Update test snapshots
* More tests
* Remove get_extra_info
* Appeasing the codebot
* Update config_flow.py
Used constant string for consistency
* Update config_flow.py
Removed code for location ID and name the integration using the username
* Update manifest.json
Updated codeowners
* Update config_flow.py
* Update config_flow.py
Formatted with black
* Update manifest.json
Updated codeowners
* Update test_config_flow.py
Updated test
* Reduce overhead of legacy database columns on new installs
* Reduce overhead of legacy database columns on new installs
* Reduce overhead of legacy database columns on new installs
* Reduce overhead of legacy database columns on new installs
* not working as expected
* override the type compiler
* override the type compiler
* override the type compiler
* override the type compiler
* Apply suggestions from code review
* pgsql char1
* make entity filter test setup with old schema
* fix some more tests that were mutating state
* fix some more tests that were mutating state
* fix some more tests that were mutating state
* fix more dbstate mutations
* add shim for older tests
* split migration tests
* add coverage for purging legacy data
* tweak
* more fixes
* drop some legacy
* fix another test
* fix a few more
* add casts for postgresql in case someone deletes the schema changes table
* dry
* dry
* dry
* Reduce creation of MQTT related discovery tasks
Most of the branching can avoid creating a task as it
did not need to await for the majority of cases. We
fallback to creating a task for the cases were we do
need to await.
* comment
* revert
* Convert tasmota discovery callback function to a normal function
Nothing was being awaited when the payload had not changed.
This allows us to avoid creating a task.
see #90801
* comment
* Reduce bond fallback polling interval when BPUP is alive
If push updates are alive we should not check every
10 seconds.
* tweak
* tweak
* coverage
* coverage
* coverage
* Clarify HomeKit include behavior in the config flow
If a domain is selected to be included and specific entities are
not selected in the domain, all entities will be included in that
domain.
* tweak