* 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
* Add Fan Speed support to Nexia integration
Adds a new "set_fan_speed" service to the Nexia integration, to allow
setting speed of the air-handler/blower fans.
* Add Fan Speed to Nexia Tests
* Remove mistakenly-added changes to Climate tests
A previous version of this change made modifications to the base
Climate entity, but that approach was later abandonded. These changes
to Climate tests were left over from that, and should never have been
included.
* Add Fan Speed Number Entity
* Remove Set Fan Speed Service
* Remove fan_speed attribute
The fan_speed attribute is not necessary with the new Number entity.
* Address reviewer feedback
Rename test function to reflect fact that fan speed entities are
entities, and not sensors.
Added missing typing to variables.
Sorted list of platforms
* Add test_set_fan_speed
Also adds new test fixture for mock response to API call
* Update homeassistant/components/nexia/number.py
* Name change
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Fetch location data and redact in diagnostics
* Implement device tracker
* Fix failing tests
* Update starlink-grpc-core
* Update coveragerc
* Hardcode GPS source type
* Use translations
* Move DEVICE_TRACKERS a little higher in the file
* Separate status and location check try/catches
* Revert "Separate status and location check try/catches"
This reverts commit 7628ec62f6.
* Do not use the device name to create the entity name
* Remove unnecessary return
* Fix mypy complains
* Gen1
* Uncapitalize description.name if channel name is used
* Fix for climate and button
* switch_3 -> switch 3
* Add _attr_has_entity_name to ShellyRestAttributeEntity
* Capitalize channel name
* Update country `province` validation.
* Run pre-commit.
* Add tests
* Mod config flow
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Don't blow up if validators can't access the issue registry
* Make the check_config script open issue_registry read only
* Update tests/helpers/test_issue_registry.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remove default code in Yale Smart Living
* Test and remove check
* Finalize
* migration
* add back
* add back 2
* Fix tests
* Fix migration if code not exist
* Log entity_id payload and template on error
* Also handle cases with default values.
* Do not log payload twice
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Tweak test to assert without payload
* black
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Make MQTT Alarm Control Panel features conditional
The MQTT Alarm Control Panel currently enables all features (arm home,
arm away, arm night, arm vacation, arm custom bypass) unconditionally.
This clutters the interface and can even be potentially dangerous, by
enabling modes that the remote alarm may not support.
Make all the features conditional, by adding a new "supported_features"
configuration option, comprising a list of the supported features as
options. Feature enablement seems inconsistent across the MQTT
component; this implementation is most alike to the Humidifier modes
option, but using a generic "supported_features" name that other
implementations may reuse in the future.
The default value of this new setting remains to be all features, which
while it may be overly expansive, is necessary to maintain backwards
compatibility.
* Apply suggestions from code review
* Use vol.Optional() instead of vol.Required() for "supported_features".
* Move the initialization of _attr_supported_features to _setup_from_config.
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
* Apply suggestions from emontnemery's code review
* Use vol.In() instead of cv.multi_seelct()
* Remove superfluous _attr_supported_features initializers, already
present in the base class.
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add invalid config tests for the MQTT Alarm Control Panel
* Set expected_features to None in the invalid MQTT Alarm Control Panel tests
* Add another expected_features=None in the invalid tests
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
---------
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add humidity and dew point to tomorrow.io integration
* Fix ruff complaints
* Make mypy happy
* Merge emontnemery's changes
* Fix formatting error
* Add fake humidity and dew point to test data (first interval only)
* Fix inconsistency
* Fix inconsistency
* Fix nessclient arm home appearing as arm away
* patch arming mode enum and use dynamic access
* Revert "patch arming mode enum and use dynamic access"
This reverts commit b9cca8e92bcb382abe364381a8cb1674c32d1d2a.
* Remove mock enums
* Add device_class on charging remaining time
Set `device_class to `duration` on the `charging_remaining_time` entity in the Renault integration.
I had some issues showing this property on my dashboard, and setting this fixed it. The recommendation to open an issue against the original integration in these kinds of cases came from [here](https://community.home-assistant.io/t/how-to-format-a-card-to-show-hours-instead-of-seconds/425473/7).
* Update test const to add duration
* fix other cars
* Update test_sensor.ambr
* add duration in ambr
* Simplify error handling in otbr async_setup_entry
* Create issue if the OTBR does not support border agent ID
* Update test
* Improve test coverage
* Catch the right exception