* Use loop time to set context
loop time is faster than utcnow, and since its only used internally it can
be switched without a breaking change
* fix mocking
* Allow specifying a custom log function for template render
* Bypass template cache when reporting errors + fix tests
* Send errors as events
* Fix logic for creating new TemplateEnvironment
* Add strict mode back
* Only send error events if report_errors is True
* Force test of websocket_api only
* Debug test
* Run pytest with higher verbosity
* Timeout after 1 minute, enable syslog output
* Adjust timeout
* Add debug logs
* Fix unsafe call to WebSocketHandler._send_message
* Remove debug code
* Improve test coverage
* Revert accidental change
* Include severity in error events
* Remove redundant information from error events
* Show OTA update progress
* Use an event listener instead of a dispatcher
* Add tests
* Fix name
* Improve tests coverage
* Fix subscribe/unsubscribe logic
* Use async_on_remove()
* Fix memory leak in dispatcher removal
When we removed the last job/callable from the dict for the
signal we did not remove the dict for the signal which meant
it leaked
* comment
* cleanup a bit more
* Speed up responding to states being polled via API
Switch to using `as_dict_json` to avoid serializing states over and over when the
states api is polled since the mobile app is already building the cache as it also
polls the states via the websocket_api
* Speed up responding to states being polled via API
Switch to using `as_dict_json` to avoid serializing states over and over when the
states api is polled since the mobile app is already building the cache as it also
polls the states via the websocket_api
* fix json
* cover
* Set state of entity with invalid state to unknown
* Add test
* Apply suggestions from code review
Co-authored-by: Robert Resch <robert@resch.dev>
* Update test_entity.py
---------
Co-authored-by: Robert Resch <robert@resch.dev>
* Extend template entities with a script section
This allows making a trigger entity that triggers a few times a day,
and allows collecting data from a service resopnse which can be
fed into a template entity.
The current alternatives are to publish and subscribe to events or to
store data in input entities.
* Make variables set in actions accessible to templates
* Format code
---------
Co-authored-by: Erik <erik@montnemery.com>
* Shared fixture on TEMP_DIR_NAME mock in MQTT tests
* Improve mqtt certificate file tests
* Update tests/components/mqtt/test_util.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update tests/components/mqtt/conftest.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Avoid blocking code
* typo in sub function
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add the SiLabs flasher as a dependency
* Create a repair if the wrong firmware is detected on an EZSP device
* Update homeassistant/components/zha/strings.json
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
* Provide the ZHA config entry as a reusable fixture
* Create a separate repair when using non-Nabu Casa hardware
* Add unit tests
* Drop extraneous `config_entry.add_to_hass` added in 021def44
* Fully unit test all edge cases
* Move `socket://`-ignoring logic into repair function
* Open a repair from ZHA flows when the wrong firmware is running
* Fix existing unit tests
* Link to the flashing section in the documentation
* Reduce repair severity to `ERROR`
* Make issue persistent
* Add unit tests for new radio probing states
* Add unit tests for new config flow steps
* Handle probing failure raising an exception
* Implement review suggestions
* Address review comments
---------
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
* Create ZHA entities before attempting to connect to the coordinator
* Delete the ZHA gateway object when unloading the config entry
* Only load ZHA groups if the coordinator device info is known offline
* Do not create a coordinator ZHA device until it is ready
* [WIP] begin fixing unit tests
* [WIP] Fix existing unit tests (one failure left)
* Fix remaining unit test
* Bump pyAussieBB
* rolling back to previous version
* patching the pydantic 2.x issue in aussie_broadband integration
* adding test for validate_service_type
* adding test for validate_service_type
* fixing tests, again
* adding additional test
* doing fixes for live tests
* Implement Feedback
* Add test to detect pydantic2
* Update test_init.py
* Update docstring
---------
Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
* Add zwave_js controller status sensor
* Also update network status command
* fix tests
* Remove WS command since we have a sensor entity
* Update sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* move driver assertion out of closures
* store state in tests
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add pipeline option to save wake/stt audio to media
* Add debug_recording_dir to assist_pipeline YAML config
* Clean up and additional tests
* Remove I/O in event loop
* Organize saved audio by pipeline name and device id
* Record wake/stt debug audio in separate thread
* Fix after rebase
* Use timestamp instead of pipeline id for directory name
* Add WAV write error test
* Join thread in executor
* Allow one retry before raising ConfigEntryAuthFailed
* Move time with freezer
* Update homeassistant/components/bmw_connected_drive/coordinator.py
---------
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Validate slug in addon services
* Move validator into hassio component
* Fixes from mypy
* Fix test for changes
* Adjust fixtures to current supervisor
* Fix call counts after fixture adjustment
* Increase coverage
* Initial implementation of migration back to Zigbee firmware
* Fix typo in `BACKUP_RETRIES` constant name
* Name potentially long-running tasks
* Add an explicit timeout to `_async_wait_until_addon_state`
* Guard against the addon not being installed when uninstalling
* Do not launch the progress flow unless the addon is being installed
* Use a separate translation key for confirmation before disabling multi-PAN
* Disable the bellows UART thread within the ZHA config flow radio manager
* Enhance config flow progress keys for flasher addon installation
* Allow `zha.async_unload_entry` to succeed when ZHA is not loaded
* Do not endlessly spawn task when uninstalling addon synchronously
* Include `uninstall_addon.data.*` in SkyConnect and Yellow translations
* Make `homeassistant_hardware` unit tests pass
* Fix SkyConnect unit test USB mock
* Fix unit tests in related integrations
* Use a separate constant for connection retrying
* Unit test ZHA migration from multi-PAN
* Test ZHA multi-PAN migration helper changes
* Fix flaky SkyConnect unit test being affected by system USB devices
* Unit test the synchronous addon uninstall helper
* Test failure when flasher addon is already running
* Test failure where flasher addon fails to install
* Test ZHA migration failures
* Rename `get_addon_manager` to `get_multiprotocol_addon_manager`
* Remove stray "addon uninstall" comment
* Use better variable names for the two addon managers
* Remove extraneous `self.install_task = None`
* Use the addon manager's `addon_name` instead of constants
* Migrate synchronous addon operations into a new class
* Remove wrapper functions with `finally` clause
* Use a more descriptive error message when the flasher addon is stalled
* Fix existing unit tests
* Remove `wait_until_done`
* Fully replace all addon name constants with those from managers
* Fix OTBR breakage
* Simplify `is_hassio` mocking
* Add missing tests for `check_multi_pan_addon`
* Add missing tests for `multi_pan_addon_using_device`
* Use `waiting` instead of `sync` in class name and methods
* Wrap attribute writes in a helper throwing `HomeAssistantError`
* Do not check for `Exception` instances, they are now propagated
* Write `cie_addr` synchronously
* Fix unnecessary `if` in `async_set_native_value`
* Fix unit tests
* Use `HomeAssistantError` in cover commands
* Revert writing `cie_addr` synchronously
* Disallow proxying of some cluster methods to fix unit test warnings
* Unit test cover failures to increase coverage
* Unit test missing climate device
* Unit test remaining cover commands
* Switch async_track_same_state to use async_call_later
There was no need to use async_track_point_in_utc_time here since
we only need a delay
* update trigger tests
* remove some more utcnow patching
* remove some more utcnow patching
* remove some more utcnow patching
* New integration for Vodafone Station
* coveragerc
* Add ConfigFlow,ScannerEntity,DataUpdateCoordinator
* Introduce aiovodafone lib
* heavy cleanup
* bump aiovodafone to v0.0.5
* add config_flow tests (100% coverage)
* run pre-comimit scripts again
* Remove redundant parameter SSL
* rename and cleanup
* cleanup and bug fix
* cleanup exceptions
* constructor comment review
* improve test patching
* move VodafoneStationDeviceInfo to dataclass
* intriduce home field
* dispacher cleanup
* remove extra attributes (reduces state writes)
* attempt to complete test flow
* complete flow for test_exception_connection
* add comment about unique id
Retry tplink setup later if device has an unexpected serial
If the DHCP reservation changed and there is now a different tplink device at
the saved IP address, retry setup later to avoid cross linking devices
* Add wait_for_next_keyframe option to stream images
Add STREAM_SNAPSHOT to CameraEntityFeature
Use wait_for_next_keyframe option for snapshots using stream
* Update stream test comments
* Add generic camera snapshot test
* Get stream still images directly in camera
Remove getting stream images from generic, nest, and ONVIF
Refactor camera preferences
Add use_stream_for_stills setting to camera
Update tests
* Only attempt to get stream image if integration supports stream
* Use property instead of entity registry setting
* Split out getting stream prerequisites from stream_source in nest
* Use cached_property for rtsp live stream trait
* Make rtsp live stream trait NestCamera attribute
* Update homeassistant/components/nest/camera.py
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Change usage of async_timeout
* Change import formatting in generic/test_camera
* Simplify Nest camera property initialization
---------
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Make arguments for async_pipeline_from_audio_stream keyword-only after hass
* Use a bytearray ring buffer
* Move generator outside
* Move stt stream generator outside
* Clean up execute
* Refactor VAD to use bytearray
* More tests
* Refactor chunk_samples to be more correct and robust
* Change AudioBuffer to use append instead of setitem
* Cleanup
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Clean up imports
Add refresh after login in update
* Bump somecomfort 0.0.17
Separate Somecomfort error to unauthorized
* Add tests
* Run Black format
* Improve performance of abort_entries_match
In #90406 a ChainMap was added which called __iter__
and __contains__ which ends up creating temp dicts
for matching
174e9da083/Lib/collections/__init__.py (L1022)
We can avoid this by removing the ChainMap since there
are only two mappings to match on.
This also means options no longer obscures data
* adjust comment
* Add entity to pick best hours
* Add entity also to diagnostics
* Remove string translation that doesn't exists
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Support Gas Valve
* Treat opening and closing as open
* Use set_state()
* Change entity icon and name
* Add valve state sensor
* Closing == closed
* Add translations for valve state entity
* Valve state -> Valve status
* Add tests; use control_result
* Fix mypy error
* Add missing "valve" to the Mock
* Improve docstrings
* Fix climate platform tests
* Increase test coverage
* Add mising return
* Add update platform
* Take care of progress
* Adapt to recent development
* Only add platform if supported
* Avoid unneeded line change
* Fix ruff in tests
* Handle update failures like in button platform
* Apply suggestions
* Fix tests
* Remove unused logger
* ESPHome Wake Word support
* Remove all vad code from esphome integration
* Catch exception when no wake word provider found
* Remove import
* Remove esphome vad tests
* Add tests
* More tests