* Do not wait
* Correct tests
* Manage after dependencies stage 1
* test bootstrap dependencies
* Assert log the dependenciy is waited for
* Improve docstrings
* Assert outside callback
* Patch async_get_integrations
* Revert changes made to snips integration
* Undo changes to mqtt_statestream
* Play tone when starting a VoIP call
* Play audio message when call is rejected
* Add option to disable tone for tests
* Send RTP audio in executor to reduce jitter
* Don't start pipeline until speech
* Bump voip utils
* init roborock commit
* init commit of roborock
* removed some non-vacuum related code
* removed some non-needed constants
* removed translations
* removed options flow
* removed manual control
* remove password login
* removed go-to
* removed unneeded function and improved device_stat
* removed utils as it is unused
* typing changes in vacuum.py
* fixed test patch paths
* removed unneeded records
* removing unneeded code in tests
* remove password from strings
* removed maps in code
* changed const, reworked functions
* remove menu
* fixed tests
* 100% code coverage config_flow
* small changes
* removed unneeded patch
* bump to 0.1.7
* removed services
* removed extra functions and mop
* add () to configEntryNotReady
* moved coordinator into seperate file
* update roborock testing
* removed stale options code
* normalize username for unique id
* removed unneeded variables
* fixed linter problems
* removed stale comment
* additional pr changes
* simplify config_flow
* fix config flow test
* Apply suggestions from code review
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* First pass at resolving PR comments
* reworked config flow
* moving vacuum attr
* attempt to clean up conflig flow more
* update package and use offline functionality
* Fixed errors and fan bug
* rework model and some other small changes
* bump version
* used default factory
* moved some client creation into coord
* fixed patch
* Update homeassistant/components/roborock/coordinator.py
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* moved async functions into gather
* reworked gathers
* removed random line
* error catch if networking doesn't exist or timeout
* bump to 0.6.5
* fixed mocked data reference url
* change checking if we have no network information
Co-authored-by: Allen Porter <allen.porter@gmail.com>
---------
Co-authored-by: Allen Porter <allen.porter@gmail.com>
Co-authored-by: Allen Porter <allen@thebends.org>
* Make sure MQTT is available starting mqtt_json
* Wait for mqtt client
* Sync client connect
* Simplify
* Addiitional tests async_wait_for_mqtt_client
* Improve comment waiting for mqtt
* Improve docstr
* Do not wait unless the MQTT client is in setup
* Handle entry errors during setup
* More comments - do not clear event
* Add snips and mqtt_room
* Add manual_mqtt
* Update homeassistant/components/mqtt/__init__.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Use a fixture, improve tests
* Simplify
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Fallback to generating a new ULID on migraiton if context is missing or invalid
It was discovered that postgresql will do a full scan if
there is a low cardinality on the index because of missing
context ids. We will now generate a ULID for the timestamp
of the row if the context data is missing or invalid
fixes#91514
* tests
* tweak
* tweak
* preen
* Remove legacy context lookup implemention from logbook
This object can now be replaced with a simple dict
* Remove legacy context lookup implemention from logbook
This object can now be replaced with a simple dict
* scope
* fix order issue
* rename channel -> cluster handler
* remove refs to channels and create endpoint class
* remove remaining references to channels
* fix filter
* take in latest changes from #91403
* missed one
* missed a reference
* ESPHome binary sensor representing assist pipeline running
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Rename to call active
Simplify with attrs a little
* Load binary sensor if voice assistant on device
* Add some tests
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Move legacy tts
* Add error log on unknown platform
* Add legacy tests and delint all tests
* Consolidate log format
* Add more legacy tests
* Test default legacy provider attributes
* Remove test generated files
* Clean up after merge conflict
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
Co-authored-by: mib1185 <mail@mib85.de>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add dhcp ip update support to onvif
If we know the mac address of the camera we can
update the config entry when the ip changes
* fix lookup
* coverage
* remove unreachable
* remove unreachable
* remove unreachable
* Support marking an assist pipeline as preferred
* Adjust
* Revert unneeded change
* Send preferred pipeline id in pipeline list
* Don't use property functions for the preferred pipeline
* Ensure recorder run shutdown if the run loop raises
If anything goes wrong with the recorder we should
still try to shutdown cleanly
* tweak
* tests
* tests
* handle migraiton failure
* tweak comment
* naming
* order
* order
* order
* reword
* adjust test
* fixes
* threading
* failure case
* fix test
* have to wait for stop because the task blocks on thread join
* Add stt entity
* Update demo platform
* Rename ProviderEntity to SpeechToTextEntity
* Fix get method
* Run all init tests for config entry setup
* Fix and test metadata from header
* Test config entry unload
* Rename get provider entity
* Test post for non existing provider
* Test entity name before addition
* Test restore state
* Use register shutdown
* Update deprecation comment
* Add language util
* Add no match tests
* Update tests/util/test_language.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* 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
* lower case aiosomecomfort
* add tests
* Test updates for 0.0.6
* lower case aiosomecomfort
* Missing changes after merge
* Add missing type hints
* Fix tests for PR#89393
* Test hold on when setting temperature
* Remove unnecessary init function
* Remove unnecessary assert
* Address missing tests
Cleanup related to comments for EM
* Move to snapshot for static test
* Updated snapshot
* Remove unnecessary assert
* Test coverage for init and common
* Update snapshot
* break setup state snapshot test across platforms
* Fix state snapshot test methods
* Remove the test_init snapshot
* Remove test_common and test_init changes
* refactor the request_mock fixture
* 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 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
* Switch back to using call_later for the slow entity update warning
I had originally changed this to create a task and wait
in #41184 but that does not make sense anymore with newer
cpython as the profile now shows the original method is cheaper
(or I did it wrong the first time)
* fix missing block till done since there is no longer a task being created which would run the event loop once
* Raise an issue for SQL queries that will cause full table scans
* Raise an issue for SQL queries that will cause full table scans
* Raise an issue for SQL queries that will cause full table scans
* Raise an issue for SQL queries that will cause full table scans
* Update homeassistant/components/sql/sensor.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* coverage
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Restart entity id post migration after a restart
If the entity migration finished and Home Assistant was
restarted during the post migration it would never be resumed
which means the old index and space would never be recovered
* add migration resume test
* Allow value_template to be used if json_attributes set
* Set state to None if no value_template and json_attributes used
* Refactor check for no value_template when json_attributes used
* Updated and additional unit test
* Updated to set _attr_native_value and return if value_template is None
* Update unit test docstring
* Updated test docstring based on feedback
* Refactor handling of exposed entities for cloud Alexa
* Tweak WS API
* Validate assistant parameter
* Address some review comments
* Refactor handling of exposed entities for cloud Google
* Raise when attempting to expose an unknown entity
* Add tests
* Adjust cloud tests
* Allow getting expose new entities flag
* Test Alexa migration
* Test Google migration
* Add WS command cloud/google_assistant/entities/get
* Fix return value
* Update typing
* Address review comments
* Rename async_get_exposed_entities to async_get_assistant_settings
* Add a pipeline store to voice_assistant
* Improve error handling
* Improve test coverage
* Improve test coverage
* Use StorageCollectionWebsocket
* Correct rebase
* Android TV Remote integration
* Add diagnostics
* Remove test pem files from when api was not mocked
* Address review comments
* Remove hass.data call in test
* Store the certificate and key in /config/.storage
* update comments
* Update homeassistant/components/androidtv_remote/__init__.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* import callback
* use async_generate_cert_if_missing
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* fix bluetooth_le_tracker reporting devices Home when they leave
* refactor
* implement tests for BLE service_info.time check
* update bluetooth_le_tracker tests
* tweaks
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Cleanup config merging and adding defaults
* Optimize and update tests
* Do not mix entry and yaml config
* Make sure hass.data is initilized
* remove check on get_mqtt_data
* Tweaks to MQTT client
* Remove None assigment mqtt client and fix mock
* Restore state for ZHA OnOff binary sensors
* Let `Motion` extend `Opening`
`Motion` is just a specified version of `Opening` that only changes the device class for some motion sensors.
Since we have more "special code" in the OnOff/Opening sensor now, we also want to make sure that gets applied to `Motion` binary sensors.
* Improve comment and type
* Add test to verify that binary sensors restore last HA state
* Add DHCP discovery to Obihai
* Unique ID is MAC
* Move try blocks, cleanup
* Migrate existing unique_ids
* Use PyObihai to update Unique ID
* Auth then use get_device_mac
* Config flow changes
* Reworking flow according to feedback
* Cleanup
* Raise repair issue if OTBR and ZHA are on different channels
* Update issues after creating or setting dataset
* Explain impact
* Add link to documentation, adjust language
* Update homeassistant/components/otbr/strings.json
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add entity name translations to Switchbot
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
* Apply suggestions from code review
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
* Fix tests
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
* Update homeassistant/components/switchbot/strings.json
Co-authored-by: Patrick ZAJDA <patrick@zajda.fr>
---------
Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Fix memory churn in state templates
The LRU for state templates was limited to 512 states. As soon
as it was exaused, system performance would tank as each template
that iterated all states would have to create and GC any state
> 512
* does it scale?
* avoid copy on all
* comment
* preen
* cover
* cover
* comments
* comments
* comments
* preen
* preen
* Speed up entity filter when there are many glob matchers
Since we do no care about which glob matches we can
combine all the translated globs into a single regex
which reduces the overhead
* delete unused code
* preen