Commit Graph

17702 Commits (8a9b2f4515fc95e5e424a279af09001346c87044)

Author SHA1 Message Date
Erik Montnemery 709ce7e0af
Set state of entity with invalid state to unknown (#99452)
* 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>
2023-09-04 14:09:51 +02:00
Erik Montnemery 6223af1899
Don't set assumed_state in fan groups (#99399) 2023-09-04 14:08:50 +02:00
Erik Montnemery f3d8a0eaaf
Don't set assumed_state in cover groups (#99391) 2023-09-04 14:08:38 +02:00
Russell Cloran 9144ef7ed8
Enumerate available states in Prometheus startup (#97993) 2023-09-04 09:30:56 +02:00
Marc Mueller 735b5cf1a0
Fix sql test warning (#99556) 2023-09-03 19:58:13 -05:00
Marc Mueller 115518cab9
Fix tolo test warning (#99555) 2023-09-03 19:58:01 -05:00
jan iversen f85a3861f2
Make validator for modbus table controlled (#99092) 2023-09-03 21:04:58 +02:00
Rami Mosleh ca44242095
Allow glances entries with same IP but different ports (#99536) 2023-09-03 19:22:59 +02:00
jan iversen d19f617c25
Modbus switch, allow restore "unknown" (#99533) 2023-09-03 17:48:25 +02:00
Allen Porter c938b9e7a3
Rename nest test_sensor_sdm.py to test_sensor.py (#99512) 2023-09-03 10:36:20 -05:00
jan iversen c94d4f501b
Read modbus data before scan_interval (#99243)
Read before scan_interval.
2023-09-03 17:13:49 +02:00
J. Nick Koston 186e796e25
Speed up fetching states by domain (#99467) 2023-09-03 09:30:39 -05:00
J. Nick Koston 1183bd159e
Bump zeroconf to 0.93.1 (#99516)
* Bump zeroconf to 0.92.0

changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.91.1...0.92.0

* drop unused argument

* Update tests/components/thread/test_diagnostics.py

* lint

* again

* bump again since actions failed to release the wheels
2023-09-03 11:16:26 +02:00
Allen Porter 7b1c0c2df2
Extend template entities with a script section (#96175)
* 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>
2023-09-02 16:19:45 -07:00
Marc Mueller 6312f34538
Fix zha test RuntimeWarning (#99519) 2023-09-03 01:07:17 +02:00
Jc2k 4b11a632a1
Add sensors to private_ble_device (#99515) 2023-09-02 17:45:46 -05:00
J. Nick Koston b8f8cd1797
Reduce overhead to retry config entry setup (#99471) 2023-09-02 16:46:53 -05:00
Richard Kroegel bec36d3914
Add long-term statistics to BMW sensors (#99506)
* Add long-term statistics to BMW ConnectedDrive sensors

* Add sensor test snapshot

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-09-02 14:44:28 -07:00
starkillerOG 834f3810d3
Check new IP of Reolink camera from DHCP (#99381)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-02 21:00:33 +02:00
J. Nick Koston 1ab2e900f9
Improve lingering timer checks (#99472) 2023-09-02 12:43:27 -05:00
Jan Bouwhuis c3841f8734
Rework on mqtt certificate tests (#99503)
* 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>
2023-09-02 19:26:11 +02:00
J. Nick Koston acd9cfa929
Speed up calls to the all states api (#99462) 2023-09-02 12:08:07 -05:00
Erik Montnemery defd9e4001
Don't compile missing statistics when running tests (#99446) 2023-09-02 10:09:46 -05:00
Jc2k 26b1222fae
Support tracking private bluetooth devices (#99465)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-02 09:21:05 -05:00
Paarth Shah 4d3b978398
Change matrix component to use matrix-nio instead of matrix_client (#72797) 2023-09-02 15:02:55 +02:00
Jan Bouwhuis 3d1efaa4ad
Freeze time for MQTT sensor expire tests (#99496) 2023-09-02 04:10:57 -05:00
Russell Cloran 5fd14eade5
Handle timestamp sensors in Prometheus integration (#98001) 2023-09-02 10:20:36 +02:00
Jan-Philipp Benecke cf59ea3c47
Use snapshot assertion for netatmo diagnostics test (#99159) 2023-09-01 19:27:54 +02:00
Raman Gupta 169a318ec4
Fix device name in zwave_js repair flow (#99414) 2023-09-01 18:06:37 +02:00
puddly 38270ee823
Create a ZHA repair when directly accessing a radio with multi-PAN firmware (#98275)
* 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>
2023-09-01 09:05:45 -04:00
Allen Porter 1539853c0a
Update google-nest-sdm to 3.0.2 (#99175)
* Update google-nest-sdm to 3.0.2

* Fix device typing

* Update homeassistant/components/nest/device_info.py

Co-authored-by: jan iversen <jancasacondor@gmail.com>

---------

Co-authored-by: jan iversen <jancasacondor@gmail.com>
2023-08-31 20:33:36 -07:00
J. Nick Koston 0da94c20b0
Significantly reduce overhead to filter event triggers (#99376)
* fast

* cleanups

* cleanups

* cleanups

* comment

* comment

* add more cover

* comment

* pull more examples from forums to validate cover
2023-08-31 13:47:01 -04:00
puddly 22c5071270
Initialize ZHA device database before connecting to the radio (#98082)
* 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
2023-08-31 12:09:46 -04:00
Erik Montnemery 80caeafcb5
Add documentation URL for homeassistant_yellow (#99336)
* Add documentation URL for homeassistant_yellow

* Fix test

* Tweak
2023-08-31 10:50:53 -04:00
Joakim Sørensen 7042a02d72
Add remote alias to connection info response (#99410) 2023-08-31 10:43:32 -04:00
Erik Montnemery f36a300651
Improve template sensor config flow validation (#99373) 2023-08-31 15:16:32 +02:00
Erik Montnemery 35560e01b9
Add documentation URL for homeassistant_sky_connect (#99377) 2023-08-31 10:39:24 +02:00
Brett Adams e08661dad3
Patch service validation in Aussie Broadband (#99077)
* 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>
2023-08-31 09:45:44 +02:00
tronikos 343e8f0ecc
Opower MFA fixes (#99317)
opower mfa fixes
2023-08-31 06:36:07 +02:00
Erik Montnemery 03b1c7ad1d
Minor improvement in tests of hardware integrations (#99361) 2023-08-30 21:11:52 +02:00
Erik Montnemery 8c04e4c7a3
Add explicit test of template config entry setup (#99345) 2023-08-30 19:56:34 +02:00
Raman Gupta 867e9b73bb
Add zwave_js device config file change fix/repair (#99314)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-30 17:29:22 +02:00
Erik Montnemery 501d5db375
Add config flow for template binary sensor (#99339) 2023-08-30 17:28:56 +02:00
Joost Lekkerkerker a5dcc25aab
Add snapshot assertion to Airzone (#98760)
Co-authored-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-08-30 17:11:55 +02:00
Erik Montnemery f9b2e10f72
Add new board type (#99334) 2023-08-30 16:37:13 +02:00
Erik Montnemery 63c538b024
Add config flow for template sensor (#98970)
* Add config flow for template sensor

* Tweak error reporting

* Improve validation

* Fix test

* Rename translation strings

* Improve validation

* Fix sensor async_setup_entry

* Avoid duplicating sensor device class translations

* Avoid duplicating sensor device class translations

* Add config flow tests

* Include all units from DEVICE_CLASS_UNITS in unit_of_measurement select

* Address review comments
2023-08-30 16:22:52 +02:00
Raman Gupta 6e5f4566d5
Add zwave_js controller status sensor (#99252)
* 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>
2023-08-30 06:50:23 -04:00
Jan-Philipp Benecke 027ce55fa6
Use snapshot assertion for google assistant diagnostics test (#99167) 2023-08-30 12:25:06 +02:00
Jan-Philipp Benecke fb42042402
Use snapshot assertion for nextdns diagnostics test (#99157) 2023-08-30 12:22:10 +02:00
G Johansson 2ce5b08fc3
Deprecate timer start optional duration parameter (#93471)
* Deprecate timer start option duration parameter

* Add test

* Fix strings

* breaks_in_ha_version

* strings

* Mod string
2023-08-30 11:48:13 +02:00
Richard Kroegel 021b14fc17
Refactor & enhance BMW tests (#97895)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-08-30 11:45:09 +02:00
jan iversen 9ef3ec3dd3
Add modbus test for configuration errors (#98697) 2023-08-30 11:34:51 +02:00
Raman Gupta 40748a6c34
Add zwave_js controller identify event (#99254) 2023-08-30 11:32:41 +02:00
Joost Lekkerkerker 56b99d2bc6
Add entity translations to QNAP QSW (#98915) 2023-08-30 11:20:15 +02:00
Michael e7462e916a
Conditional category for temperature sensor entities in AVM Fritz!Smarthome (#98981) 2023-08-30 10:29:35 +02:00
Michał Huryn e911b73b61
Add extra sensors to Blebox (#90516) 2023-08-30 10:20:45 +02:00
Sebastian Mayr 6e8b3837b0
Add support for MFA auth in opower (#97878)
* Add support for MFA auth in opower

* Make MFA an extra step

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-08-29 23:37:37 -04:00
Willem-Jan van Rootselaar 1e37e1e355
Bump python-bsblan to 0.5.16 (#99238) 2023-08-29 23:23:20 -04:00
Michael Hansen 054a63c3a2
Add option to save Assist pipeline audio (#98928)
* 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
2023-08-29 23:07:27 -04:00
Richard Kroegel b403cb41c0
Allow one retry before raising ConfigEntryAuthFailed for bmw_connected_drive (#99168)
* 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>
2023-08-29 21:41:50 +02:00
Álvaro Fernández Rojas 4508e341c9
Add wind gust to AEMET hourly forecasts (#99289)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-08-29 21:14:37 +02:00
Mike Degatano e0eb63c588
Validate slug in addon services (#99232)
* 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
2023-08-29 13:57:41 -04:00
Phil Bruckner 10c53dd284
Fix Life360 reauthorization config flow (#99227) 2023-08-29 16:38:11 +02:00
Álvaro Fernández Rojas 2e0a22fdaf
Use freezegun in AEMET tests (#99253) 2023-08-29 09:33:12 -05:00
Joost Lekkerkerker f28634ea11
Migrate PVPC to has entity name (#98894)
* Migrate PVPC to has entity name

* Set device name

* Fix feedback
2023-08-29 16:26:23 +02:00
Robert Resch 6223b1f599
Add ws endpoint "auth/delete_all_refresh_tokens" (#98976)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-29 15:57:54 +02:00
Álvaro Fernández Rojas fae82731e1
Simplify and improve AEMET coordinator updates (#99273) 2023-08-29 08:43:14 -05:00
Quentame f1ec99b9c9
Add Freebox Home battery sensor (#99222)
* Add Freebox Home battery sensor

* Review

* Review 2

* Freebox battery is a SensorEntity, not a FreeboxSensor
2023-08-29 12:13:01 +02:00
G Johansson 657ed0bcdb
Clean out compatibility for deprecated methods in Weather (#99263)
Clean out compatability in Weather
2023-08-29 11:33:56 +02:00
G Johansson 7a690d7359
Add deprecation to legacy forecast for Weather (#97294)
* Add deprecation to legacy forecast

* Mod _reported

* issue

* remove not need variable

* kitchen_sink

* 2024.3

* remove demo and mqtt

* add checks

* fix deprecation

* remove variable

* fix kitchen_sink

* Fix deprecation warning

* Expand issue

* clean

* Fix tests

* fix kitchen_sink

* not report on core integrations
2023-08-29 10:38:59 +02:00
Erik Montnemery b22b51fe3b
Fix stale docstring in trafikverket_camera tests (#99260) 2023-08-29 10:28:32 +02:00
Joost Lekkerkerker ddbf85fc38
Abort YouTube configuration if user doesn't have subscriptions (#99140) 2023-08-29 09:36:27 +02:00
epenet c81d39f651
Fix Renault AssertionError (#99189) 2023-08-29 08:58:20 +02:00
Raman Gupta be126da72d
Bump zwave-js-server-python to 0.51.0 (#99250)
* Bump zwave-js-server-python to 0.51.0

* Fix how we patch the command
2023-08-29 02:45:43 -04:00
puddly c8ef3f9393
Automatic migration from multi-PAN back to Zigbee firmware (#93831)
* 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
2023-08-28 17:26:34 -04:00
puddly 23839a7f10
Wrap most ZHA exceptions in `HomeAssistantError` (#98421)
* 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
2023-08-28 17:24:12 -04:00
J. Nick Koston 0e6b3d6583
Switch async_track_same_state to use async_call_later (#99219)
* 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
2023-08-28 22:30:20 +02:00
J.P. Krauss 95c03b4192
Add Options Flow to change radius after initial configuration (#97285)
* Add Options Flow to change radius after initial configuration

* Add tests for Options Flow

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Incorporate review suggestions

* Fix diagnostics test case

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Incorporate review suggestions

* Revert "Incorporate review suggestions"

This reverts commit 421e140a4fc78da22ea74c95cd1a17f9305ebbf6.

* Fix broken review comments

* Incorporate rest of review comments

* Incorporate rest of review comments

* Use Config Entry Migration

* Remove old migration code

* Update diagnostics snapshot for config entry migration

* Incorporate review feedback

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-08-28 21:21:52 +02:00
J. Nick Koston 80d2309896
Switch async_track_time_interval to use async_call_later internally (#99220) 2023-08-28 13:56:22 -05:00
Joost Lekkerkerker 821d74e904
Add entity translations to Switcher kis (#99223)
* Add entity translations to switcher_kis

* Add entity translations

* Fix tests
2023-08-28 20:53:42 +03:00
Ian Foster ef7a246f09
Fix ruckus_unleashed for python 3.11 (#94835)
Co-authored-by: Tony <29752086+ms264556@users.noreply.github.com>
2023-08-28 17:26:40 +02:00
Erik Montnemery 9dac6a2948
Use loop.time in DataUpdateCoordinator (#98937) 2023-08-28 10:16:34 -05:00
Jake Colman f1378bba8e
Add indoor sensors to Honeywell integration (#98609)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-08-28 15:45:01 +02:00
Simone Chemelli 1692d83063
Vodafone Station device tracker (#94032)
* 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
2023-08-28 15:10:23 +02:00
Guido Schmitz 660167cb1b
Add image platform to devolo_home_network (#98036) 2023-08-28 14:55:49 +02:00
Shay Levy b0f3b7bb76
Revert "Change naming of Shelly entities to correspond with HA guidelines" (#99059) 2023-08-28 10:42:24 +02:00
Erik Montnemery e97e9ae55a
Use freezegun in trafikverket_camera tests (#99067) 2023-08-28 09:23:32 +02:00
J. Nick Koston d17ffff3e3
Retry tplink setup later if device has an unexpected mac address (#98784)
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
2023-08-27 19:00:39 +02:00
Robert Svensson 5e5193eeb5
Rework UniFi Network Controller device and add software version (#99136)
Rework Network Controller device and add software version
2023-08-27 17:07:38 +02:00
Robert Svensson 71bf782b22
Improve UniFi PoE control by queueing commands together (#99114)
* Working draft without timer

* Clean up
Improve tests

* Use async_call_later
2023-08-27 16:58:48 +02:00
Joost Lekkerkerker b266096ae1
Use snapshot assertion for Watttime diagnostics test (#99023) 2023-08-27 09:19:15 -05:00
J. Nick Koston c087e6eab6
Revert "Bump python bsblan 0.5.14" (#99130) 2023-08-27 08:59:28 -05:00
Robert Svensson 45efe29262
Bump aiounifi to v58 (#99103) 2023-08-26 18:27:45 -05:00
Willem-Jan van Rootselaar a81e6d5811
Bump python bsblan 0.5.14 (#99089)
* update python-bsblan to 0.5.14

* fix test diagnostics
2023-08-26 22:13:25 +03:00
uvjustin 407aa31adc
Generate Stream snapshots using next keyframe (#96991)
* 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>
2023-08-26 10:39:40 -07:00
Erik Montnemery d74a0fd6dd
Use freezegun in additional fronius tests (#99066) 2023-08-26 09:11:42 +02:00
Marc Mueller 6f43dd1c14
Adjust netatmo test (#99071) 2023-08-26 07:35:10 +02:00
Marc Mueller 544d6b05a5
Replace mock_coro with AsyncMock (#99014)
* Replace mock_coro with AsyncMock

* Remove mock_coro test helper function

* Remove redundant AsyncMock
2023-08-25 22:54:55 +02:00
Erik Montnemery 3a71e21d6a
Add and improve comments about staggering of event listeners (#99058) 2023-08-25 19:47:13 +02:00
Michael Hansen 8768c39021
Wake word cleanup (#98652)
* 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>
2023-08-25 13:28:48 -04:00
Jan Bouwhuis 49897341ba
Add lawn_mower platform to MQTT (#98831)
* Add MQTT lawn_mower platform

* Use separate command topics and templates

* Remove unrelated change
2023-08-25 17:56:22 +02:00
Erik Montnemery 27f7399071
Modernize accuweather weather (#99001) 2023-08-25 16:46:23 +02:00
Jan-Philipp Benecke f96c1516f8
Use snapshot assertion for gios diagnostics test (#98984) 2023-08-25 16:46:10 +02:00
Erik Montnemery b0952bc54a
Use freezegun in shelly tests (#99042) 2023-08-25 09:06:43 -05:00
Erik Montnemery 452caee41a
Use freezegun in pvpc_hourly_pricing tests (#99040) 2023-08-25 09:06:14 -05:00
Erik Montnemery c827af5826
Use freezegun in uptimerobot tests (#99046) 2023-08-25 09:05:44 -05:00
Erik Montnemery 0d3663c52a
Use freezegun in fronius tests (#99030) 2023-08-25 09:05:16 -05:00
Erik Montnemery 5617a738c0
Use freezegun in airly tests (#99028) 2023-08-25 09:04:51 -05:00
Erik Montnemery dd39e8fe64
Use freezegun in hue tests (#99033) 2023-08-25 09:04:28 -05:00
Erik Montnemery 3b07181d87
Use freezegun in fully_kiosk tests (#99031) 2023-08-25 09:03:51 -05:00
Erik Montnemery 1f9c180233
Use freezegun in iotawatt tests (#99034) 2023-08-25 09:03:29 -05:00
Erik Montnemery e6728f2f19
Use freezegun in kraken tests (#99035) 2023-08-25 09:03:12 -05:00
Erik Montnemery cb8842b1fb
Use freezegun in landisgyr_heat_meter tests (#99037) 2023-08-25 09:02:47 -05:00
Erik Montnemery 75743ed947
Use freezegun in here_travel_time tests (#99032) 2023-08-25 09:02:25 -05:00
Erik Montnemery 676f59fded
Use freezegun in trafikverket_ferry tests (#99045) 2023-08-25 09:02:07 -05:00
Erik Montnemery 81aa35a9ce
Use freezegun in version tests (#99047) 2023-08-25 09:01:48 -05:00
Erik Montnemery f99743bedb
Use freezegun in tomorrowio tests (#99044) 2023-08-25 09:01:28 -05:00
Erik Montnemery f18a277cac
Use freezegun in ws66i tests (#99049) 2023-08-25 09:00:50 -05:00
Erik Montnemery ee073e9e3e
Use freezegun in lacrosse_view tests (#99036) 2023-08-25 09:00:30 -05:00
Erik Montnemery e0af9de877
Use freezegun in motioneye tests (#99038) 2023-08-25 09:00:11 -05:00
Erik Montnemery 943db9e0d5
Use freezegun in devolo_home_network tests (#99029) 2023-08-25 08:59:52 -05:00
Erik Montnemery 346674a1a8
Use freezegun in wled tests (#99048) 2023-08-25 08:59:30 -05:00
Erik Montnemery 65d555b138
Use freezegun in qnap_qsw tests (#99041) 2023-08-25 08:59:08 -05:00
Erik Montnemery 64306ec053
Use freezegun in solaredge tests (#99043) 2023-08-25 08:58:52 -05:00
Erik Montnemery 8161810159
Use freezegun in opensky tests (#99039) 2023-08-25 14:03:51 +02:00
Jan-Philipp Benecke 4fb00e448c
Use snapshot assertion for rdw diagnostics test (#99027) 2023-08-25 13:40:08 +02:00
Marc Mueller 3ebd7d2fd1
Fix asyncio DeprecationWarning [3.12] (#98989)
* Fix asyncio DeprecationWarning [3.12]

* Use AsyncMock

* Rewrite ffmpeg tests

* Remove test classes

* Rename test file
2023-08-25 12:27:23 +02:00
Joost Lekkerkerker da9fc495ca
Improve SRP Energy coordinator (#99010)
* Improve SRP Energy coordinator

* Use time instead of asyncio
2023-08-25 11:19:40 +02:00
Joost Lekkerkerker 475fd77019
Extract SRP Energy coordinator to separate file (#98956) 2023-08-25 10:33:02 +02:00
J. Nick Koston 3ebf96143a
Improve performance of bluetooth coordinators (#98997) 2023-08-25 10:31:43 +02:00
Ville Skyttä e7b6037419
Remove unnnecessary pylint configs from components [e-l]* (#99004) 2023-08-25 09:46:34 +02:00
Erik Montnemery 3e02fb1f07
Add preview support to all groups (#98951) 2023-08-25 08:59:33 +02:00
Marc Mueller 72e6f79086
Replace remaining utcnow calls + add ruff check (#97964) 2023-08-25 03:23:43 +02:00
Marty Sun 588db501fb
Add new integration Yardian (#97326)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-08-24 17:48:49 -05:00
Jan-Philipp Benecke 3bcd1d5a1a
Use snapshot assertion for iqvia diagnostics test (#98983) 2023-08-24 23:26:21 +02:00
Jan-Philipp Benecke 4d8941d4b7
Use snapshot assertion for onvif diagnostics test (#98982) 2023-08-24 22:40:45 +02:00
Joost Lekkerkerker 54ed8fc914
Use device class translations for 1-wire (#98813) 2023-08-24 22:19:29 +02:00
mkmer f2c475cf1b
Bump aiosomecomfort to 0.0.17 (#98978)
* Clean up imports
Add refresh after login in update

* Bump somecomfort 0.0.17
Separate Somecomfort error to unauthorized

* Add tests

* Run Black format
2023-08-24 21:13:42 +02:00
Jan Bouwhuis 948b34b045
Do not force update mqtt device_tracker (#98838) 2023-08-24 20:09:14 +02:00
Erik Montnemery 2066cf6b31
Remove `group_type` from group preview events (#98952) 2023-08-24 19:54:04 +02:00
Marc Mueller 089f76099d
Fix stream test aiohttp DeprecationWarning (#98962) 2023-08-24 19:50:25 +02:00
Joost Lekkerkerker 4e049f9bed
Use snapshot assertion in Tile diagnostic test (#98965) 2023-08-24 17:11:24 +02:00
Ville Skyttä 9da192c752
Avoid use of `datetime.utc*` methods deprecated in Python 3.12 (#93684)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2023-08-24 16:38:22 +02:00
G Johansson 61c17291fb
Move TemplateEntity to template (#98957)
* Move TemplateEntity to template

* Rename template_entity in helpers
2023-08-24 15:37:04 +02:00
J. Nick Koston 99e97782b6
Improve performance of abort_entries_match (#98932)
* 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
2023-08-24 15:34:45 +02:00
Erik Montnemery b145352bbb
Modernize meteo_france weather (#98022)
* Modernize meteofrance weather

* Remove options flow

* Remove unused constant

* Format code

---------

Co-authored-by: Quentin POLLET <polletquentin74@me.com>
2023-08-24 13:44:43 +02:00
Franck Nijhof 0d013767ee
Add support for event groups (#98463)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-24 12:49:38 +02:00
J. Nick Koston 849cfa3af8
Retry yeelight setup later if the wrong device is found (#98884) 2023-08-24 12:04:00 +02:00
Erik Montnemery d282ba6bac
Use a single WS command for group preview (#98903)
* Use a single WS command for group preview

* Fix tests
2023-08-24 11:59:24 +02:00
G Johansson 3b31c58eba
Add coordinator test for Yale Smart Living (#98638) 2023-08-24 11:44:04 +02:00
Joost Lekkerkerker f395147f7c
Move platform specifics out of Solaredge const (#98941) 2023-08-24 11:27:24 +02:00
Joost Lekkerkerker f44215d286
Use snapshot assertion for Brother diagnostics test (#98904) 2023-08-24 11:19:16 +02:00
G Johansson 147351be6e
Add Trafikverket Camera integration (#79873) 2023-08-24 10:39:22 +02:00
Jan Bouwhuis 8b232047c4
Add origin info support for MQTT discovered items (#98782)
* Add integration info support for MQTT discovery.

* Moving logs to discovery

* Revert adding class property

* Rename to origin

* Follow up comments
2023-08-24 09:50:39 +02:00
Joost Lekkerkerker 602a80c35c
Use snapshot assertion for EasyEnergy diagnostics test (#98909) 2023-08-24 09:19:36 +02:00
Joost Lekkerkerker 14f80560c0
Use snapshot assertion for Ridwell diagnostics test (#98919) 2023-08-24 08:14:46 +02:00
Ville Skyttä b51c0f6ddc
Remove unnnecessary pylint configs from components [s-z]* (#98925) 2023-08-24 01:25:32 +02:00
Joost Lekkerkerker c39f6b3bea
Use snapshot assertion for Coinbase diagnostics test (#98906) 2023-08-24 01:23:31 +02:00
Joost Lekkerkerker faa4489f4c
Use snapshot assertion for Co2signal diagnostics test (#98905) 2023-08-24 01:18:49 +02:00
Joost Lekkerkerker f1fb28aad5
Use snapshot assertion for ESPHome diagnostics test (#98913) 2023-08-24 01:01:58 +02:00
Joost Lekkerkerker a539d851cc
Use snapshot assertion for Enphase Envoy diagnostics test (#98910) 2023-08-23 17:57:55 -05:00
Joost Lekkerkerker 360d2de1e1
Use snapshot assertion for Cpuspeed diagnostics test (#98907) 2023-08-24 00:57:27 +02:00
Ville Skyttä 34b47a2597
Remove unnnecessary pylint configs from components [m-r]* (#98924) 2023-08-24 00:56:50 +02:00
Ville Skyttä 3b4774d9ed
Remove unnnecessary pylint configs from components/[a-d]* (#98911) 2023-08-24 00:54:02 +02:00
Joost Lekkerkerker e471110288
Use snapshot assertion for August diagnostics test (#98901) 2023-08-23 17:52:04 -05:00
Klaas Schoute d8f0c090cf
Energyzero - Add sensor entity to pick best hours (#98916)
* 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>
2023-08-23 23:02:19 +02:00
Joakim Plate 816f834807
Add moisture sensors entities for gardena (#98282)
Add support for soil moisture sensors for gardena
2023-08-23 22:46:34 +02:00
Joost Lekkerkerker f83c335409
Use snapshot assertion for Environment Canada diagnostics test (#98912) 2023-08-23 22:21:24 +02:00
Joost Lekkerkerker 1f0e8f93c5
Use snapshot assertion for Deconz diagnostics test (#98908) 2023-08-23 21:37:03 +02:00
Joost Lekkerkerker 82e92cdf82
Use snapshot assertion for Axis diagnostics test (#98902) 2023-08-23 21:36:18 +02:00
Jan-Philipp Benecke 4aa7fb0e35
Use snapshot assertion for Discovergy diagnostics test (#98871)
Add snapshot assertion to Discovergy
2023-08-23 21:02:11 +02:00
Jean-François Roy e96ce3f520
baf: Raise ConfigEntryNotReady when the device has a mismatched UUID (#98898) 2023-08-23 13:34:38 -05:00
Jan-Philipp Benecke 39992c2ccc
Migrate BSB-Lan diagnostics test to snapshot assertion (#98899)
Migrate bsblan diagnostics test to snapshot assertion
2023-08-23 20:20:08 +02:00
Erik Montnemery ee1b6a60a0
Deduplicate group preview tests (#98883) 2023-08-23 19:13:24 +02:00
Michael Hansen 4a417c7dcc
Wake word entity state/category fix (#98886)
* Only change wake word entity state on detection

* Wake word entity is diagnostic
2023-08-23 12:11:14 -04:00
Chris Talkington b854551c77
Use entity descriptions for IPP (#93888) 2023-08-23 09:34:21 -05:00
Erik Montnemery 6be20b5408
Add preview support to binary sensor group (#98872) 2023-08-23 14:24:48 +02:00
Erik Montnemery e3b945a8d0
Don't allow numerical sensor state to be NaN or inf (#98110) 2023-08-23 14:16:40 +02:00
Marc Mueller 480c34180e
Fix forked_daapd test RuntimeWarning (#98864) 2023-08-23 12:17:32 +02:00
Joost Lekkerkerker a2b0149677
Remove config name from IPMA config flow (#98576) 2023-08-23 11:35:04 +02:00
Marc Mueller 5ae366957f
Fix imap test RuntimeWarning (#98865) 2023-08-23 10:52:19 +02:00
Álvaro Fernández Rojas 6be47b1fbd
Fix Airzone Cloud diagnostics (#98857)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-08-23 09:20:53 +02:00
Joost Lekkerkerker c4ae9ae430
Remove data rate converting code from NZBGet (#98806) 2023-08-22 23:23:13 +02:00
Álvaro Fernández Rojas 30628766ae
Update AEMET-OpenData to v0.3.0 (#98810) 2023-08-22 23:21:42 +02:00
Ville Skyttä 6399d74c15
Remove unnnecessary pylint configs from core (#98704) 2023-08-22 23:12:12 +02:00
Joost Lekkerkerker 2ff5d6290f
Migrate Prosegur to has entity name (#98845) 2023-08-22 23:09:18 +02:00
starkillerOG ade1d33367
Add entity name translations for Reolink (#98589)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-08-22 23:07:31 +02:00
J. Nick Koston 49d73441bf
Abort ESPHome connection when both name and mac address do not match (#98787) 2023-08-22 23:02:23 +02:00
Álvaro Fernández Rojas 99b5c4932f
Add hot water sensor support to Airzone (#98500)
* airzone: sensors: add hot water support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone: sensor: dhw: enable _attr_has_entity_name

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Add requested changes

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-08-22 22:48:05 +02:00
Álvaro Fernández Rojas af915f1425
Add Airzone Cloud System binary sensors (#95121)
* airzone_cloud: add System binary sensors

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone-cloud: add error example

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-08-22 22:41:03 +02:00
Jan Bouwhuis 0f58007e97
Deprecate aux heat for mqtt climate (#98666) 2023-08-22 22:39:55 +02:00
Maximilian d179f8b47d
Add filter for affected areas in NINA warnings (#97053)
* Add affected areas to warnings

* Update config flow

* Remove option from config_flow

* Add regex check

* Remove regex check
2023-08-22 22:23:34 +02:00
Joost Lekkerkerker f10a5b7ee8
Add entity translations to Dexcom (#98795) 2023-08-22 22:09:18 +02:00
Joost Lekkerkerker 0ab0901f0f
Add entity translations to Powerwall (#98843) 2023-08-22 21:58:57 +02:00
Joost Lekkerkerker 19576e6c95
Add options flow to OpenSky (#98177) 2023-08-22 18:06:19 +02:00
J. Nick Koston d0fc0aea40
Retry lifx setup later if device has an unexpected serial (#98783) 2023-08-22 10:17:15 -05:00
Joost Lekkerkerker 890efd58e0
Add entity translations to Roku (#96083)
* Add entity translations to Roku

* Add entity translations to Roku
2023-08-22 16:59:56 +02:00
Shay Levy 406f06f0fc
Abort Shelly setup if MAC address mismatch (#98807) 2023-08-22 07:41:50 -05:00
Joost Lekkerkerker 097c7fbfef
Add entity translations to Nexia (#98803) 2023-08-22 07:41:15 -05:00
Ernst Klamer 1369874348
Add text sensor to BTHome (#98355) 2023-08-22 07:34:26 -05:00
Joost Lekkerkerker 5ad97827cf
Use snapshot assertion for Airly diagnostics (#98726) 2023-08-22 12:17:43 +02:00
Maciej Bieniek 17050a3286
Add support for Shelly Gas Valve addon (#98705)
* 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
2023-08-22 11:53:52 +03:00
Erik Montnemery b885dfa5a8
Add preview to sensor group config and option flows (#83638) 2023-08-22 10:29:16 +02:00
Erik Montnemery 68e2809c36
Modernize nws weather (#98748) 2023-08-22 10:01:17 +02:00
Joost Lekkerkerker 6f7c3c949c
Add snapshot assertion to Airvisual Pro (#98759) 2023-08-22 09:31:31 +02:00
Joost Lekkerkerker d4b49726f4
Add snapshot assertion to Airzone cloud (#98761) 2023-08-22 09:30:43 +02:00
Chris Talkington 2e0038b981
Require device id for Roku entities (#98734) 2023-08-22 09:22:46 +02:00
Erik Montnemery 4a03f6482a
Set thread dataset's preferred router on add if not set (#98639) 2023-08-21 22:46:15 +02:00
Joost Lekkerkerker 52cabed98f
Migrate LastFM to has entity name (#98766) 2023-08-21 22:31:04 +02:00
Maciej Bieniek f97f33fff7
Only create an issue if push updates fail 5 times in a row for Shelly gen1 devices (#98747) 2023-08-21 22:27:36 +02:00
Robert Svensson d0d160f11c
Unifi add port forward control to switch platform (#98309) 2023-08-21 22:01:44 +02:00
Joost Lekkerkerker 30d3df2d96
Add morning and evening damping to Forecast solar (#98721)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-08-21 21:43:09 +02:00
Guido Schmitz 365dc47740
Add update platform to devolo Home Network (#86003)
* 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
2023-08-21 20:59:58 +02:00
Joost Lekkerkerker 07ffbe82c1
Add snapshot assertion to Ambient Station (#98764) 2023-08-21 19:46:36 +02:00
Ville Skyttä 2399cd283a
Python 3.10 support cleanups (#98640) 2023-08-21 19:14:07 +02:00
Martin Hjelmare 91df9434d0
Use storage helper in feedreader (#98754) 2023-08-21 18:21:34 +02:00
Jesse Hills a42d975c49
ESPHome Wake Word support (#98544)
* 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
2023-08-21 12:13:02 -04:00
Marco Garzola b8086f3c21
Map heatercooler rotation speed as 3 level fan speed in homekit controller (#98291)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-08-21 10:10:24 -05:00
G Johansson 207e3f90a6
Modernize template weather (#98064)
* Modernize template weather

* mods

* adds templates

* Fixes

* review comments

* more comments

* Fix validator

* Tests

* Mods

* Fix ruff
2023-08-21 15:48:14 +02:00
G Johansson d9906b63b7
Add `payload` to Scrape config flow (#98412)
Payload to config flow
2023-08-21 15:47:11 +02:00
Joost Lekkerkerker 4518dad83b
Use snapshot assertion for Airnow diagnostics (#98727) 2023-08-21 14:19:21 +02:00
G Johansson fb56dd0615
Fix LiteJet import config issue (#97679) 2023-08-21 12:20:48 +02:00
Michael Arthur 82b3ced4f1
Add lawnmower entity (#93623)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-21 12:19:55 +02:00
G Johansson 1a4fb90897
Clean off unnecessary logger in Workday (#98741) 2023-08-21 12:03:01 +02:00
Joost Lekkerkerker 9c54c4abf5
Use snapshot assertion for KNX diagnostics (#98724)
Co-authored-by: farmio <farmio@alphart.net>
2023-08-21 11:48:55 +02:00
Chris Talkington 1fca665b77
Use snapshot assertion for Roku diagnostics (#98731)
* use snapshot assertion for Roku diagnostics

* Delete roku3-diagnostics-data.json

* fix state time variation. add snapshot.
2023-08-21 11:48:27 +02:00
Joost Lekkerkerker 8f9529d376
Use snapshot assertion for Forecast solar diagnostics (#98723) 2023-08-21 11:18:18 +02:00
Joost Lekkerkerker 973928ffe9
Use snapshot assertion for Airvisual diagnostics (#98728) 2023-08-21 11:17:43 +02:00
Chris Talkington c0bb3dd6e0
Use snapshot assertion for Jellyfin diagnostics (#98732) 2023-08-21 11:15:58 +02:00
Shay Levy a713d7585f
Bump aioshelly to 6.0.0 (#98719) 2023-08-21 10:49:11 +03:00
Joost Lekkerkerker af689d7c3e
Use snapshot assertion for Accuweather diagnostics (#98725) 2023-08-21 09:12:43 +02:00
Joakim Plate 687bf5e808
Ignore ble name for gardena (#98126) 2023-08-21 08:43:52 +02:00
Erik Montnemery f07724ff52
Add additional tasmota tests (#98695) 2023-08-20 14:02:53 +02:00
Erik Montnemery 3fc043d99e
Deduplicate Tasmota sensor tests (#98628) 2023-08-20 09:04:48 +02:00
hahn-th f020d17dd8
Support Eco Mode Preset in Climates (#98359)
* Fix #86145

* Add missing test coverage

* Add tests for state
2023-08-19 21:32:20 +02:00
Benjamin Paul [MSFT] 5965918c86
Add Fan Speed number entity to Nexia (#98642)
* 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>
2023-08-19 16:42:13 +02:00
Ville Skyttä 3094991236
Upgrade ruff to 0.0.285 (#98647) 2023-08-19 08:17:17 -04:00
Jack Boswell 8a6bde1191
Add Starlink device tracker (#91445)
* 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.
2023-08-19 11:36:23 +02:00
Maciej Bieniek c526d23686
Change naming of Shelly entities to correspond with HA guidelines (#97533)
* 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
2023-08-19 11:13:22 +02:00
Marc Mueller c1fb97f26b
Fix aiohttp DeprecationWarning (#98626) 2023-08-19 02:28:27 +02:00
Robert Svensson 9e42451934
UniFi refactor using site data (#98549)
* Clean up

* Simplify admin verification

* Streamline using sites in config_flow

* Bump aiounifi
2023-08-18 22:44:59 +02:00
Arkadii Yakovets 7827f9ccae
Update country `province` validation (#84463)
* Update country `province` validation.

* Run pre-commit.

* Add tests

* Mod config flow

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-08-18 21:20:04 +02:00
Erik Montnemery 7fcc2dd44e
Make the check_config script open issue_registry read only (#98545)
* 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>
2023-08-18 20:15:00 +02:00
Erik Montnemery 90b9764578
Bump hatasmota to 0.7.0 (#98636)
* Bump hatasmota to 0.7.0

* Update tests according to new entity naming
2023-08-18 19:24:33 +02:00
Ville Skyttä 93683cef27
Use zoneinfo instead of pytz, mark pytz as banned in ruff (#98613)
Refs #43439, #49643.
2023-08-18 19:10:29 +02:00
G Johansson 4073f56c5e
Remove default code in Yale Smart Living (#94675)
* 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
2023-08-18 16:40:24 +02:00
G Johansson 4096de2dad
Add Yale Smart Living diagnostics test (#98590)
* Yale test diagnostics

* clean

* From review
2023-08-18 16:31:07 +02:00
Robert Resch 790523126e
Name unnamed update entities by their device class (#98579) 2023-08-18 13:40:35 +02:00
jan iversen c268adb07e
modbus: Repair swap for slaves (#97960) 2023-08-18 13:23:04 +02:00
jan iversen 1c56c39897
modbus config: count and slave_count can normally not be mixed. (#97902) 2023-08-18 13:10:13 +02:00
Jan Bouwhuis 5ef6c03610
Log entity_id payload and template on MQTT value template error (#98353)
* 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>
2023-08-18 13:05:53 +02:00
Robert Resch 7ac2c61f24
Fix copy-paste error in comments of number tests (#98615) 2023-08-18 11:02:30 +02:00
jan iversen 59d37f65d5
Correct modbus config validator: slave/swap (#97798) 2023-08-18 10:55:39 +02:00
Simone Chemelli ab9d6ce61a
New integration for Comelit SimpleHome (#96552)
* New integration for Comelit SimpleHome

* Address first review comments

* cleanup

* aiocomelit bump and coordinator cleanup

* address review comments

* Fix some review comments

* Use config_entry.unique_id as last resort

* review comments

* Add config_flow tests

* fix pre-commit missing checks

* test_conflig_flow coverage to 100%

* fix tests

* address latest review comments

* new ruff rule

* address review comments

* simplify unique_id
2023-08-18 08:40:23 +02:00
Faidon Liambotis 9fdad592c2
Add option to disable MQTT Alarm Control Panel supported features (#98363)
* 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>
2023-08-18 08:23:48 +02:00
lymanepp f6a9be937b
Add humidity and dew point to tomorrow.io integration (#98496)
* 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
2023-08-18 07:41:25 +02:00
Michael Hansen 49d2c60992
Add pipeline VAD events (#98603)
* Add stt-vad-start and stt-vad-end pipeline events

* Update tests
2023-08-17 19:58:58 -04:00
Erik Montnemery c17f08a3f5
Create a single entity for new met.no config entries (#98098)
* Create a single entity for new met.no config entries

* Fix lying docstring

* Fix test
2023-08-17 19:41:11 +02:00
Erwin Douna d761b5ddbf
Add tests and typing to Tado config flow (#98281)
* Upgrading tests

* Code improvements and removing unused function

* Update homeassistant/components/tado/config_flow.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/tado/config_flow.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/tado/config_flow.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update tests/components/tado/test_config_flow.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update tests/components/tado/test_config_flow.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update tests/components/tado/test_config_flow.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update tests/components/tado/test_config_flow.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update tests/components/tado/test_config_flow.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Importing Any

* Rerunning Blackformatter

* Adding fallback scenario to options flow

* Adding constants

* Adding a retry on the exceptions

* Refactoring to standard

* Update homeassistant/components/tado/config_flow.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Adding type to validate_input

* Updating test

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-08-17 19:37:34 +02:00
Joost Lekkerkerker dd69ba3136
Migrate Cert Expiry to has entity name (#98160)
* Migrate Cert Expiry to has entity name

* Migrate Cert Expiry to has entity name

* Fix entity name
2023-08-17 18:29:20 +02:00
Russell Cloran 49995a4667
Add tests for device tracker in Prometheus (#98054) 2023-08-17 17:58:52 +02:00
Marc Mueller 529bc507a0
Fix aiohttp test RuntimeWarning (#98568) 2023-08-17 17:42:20 +02:00
Øyvind Matheson Wergeland cb4917f880
Fix GoGoGate2 configuration URL when remote access is disabled (#98387) 2023-08-17 15:12:35 +02:00
Sebastian Lövdahl fde498586e
Expose dew point in Met.no (#98543) 2023-08-17 07:45:23 +02:00
Erik Montnemery 5c1c8dc682
Modernize tomorrowio weather (#98466)
* Modernize tomorrowio weather

* Add test snapshot

* Update snapshots

* Address review comments

* Improve test coverage
2023-08-16 20:22:38 +02:00
Erik Montnemery 8ed7d2dd3e
Don't create certain start.ca sensors for unlimited plans (#98525)
Don't create certain startca sensors for unlimited setups
2023-08-16 20:20:14 +02:00
mkmer 3e1d2a1000
Handle missing keys in Honeywell (#98392) 2023-08-16 18:59:34 +02:00
J. Nick Koston 5bf80a0f6d
Make ESPHome deep sleep tests more robust (#98535) 2023-08-16 11:05:22 -05:00
Nick Whyte 2c48f0e416
Fix ness alarm armed_home state appearing as disarmed/armed_away (#94351)
* 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
2023-08-16 13:56:52 +02:00
Mike Heath cf8c9ad184
Add PoE switch tests (#95087)
* Add PoE switch tests

* Update tests/components/tplink_omada/test_switch.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Remove files covered by tests from exclusion

* Rename entity_name to entity_id

* Fix test, use snapshot, other improvements

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-08-16 13:38:53 +02:00
Erik Montnemery 91faa53843
Don't allow hass.config.config_dir to be None (#98442) 2023-08-16 13:00:14 +02:00
Diogo Gomes abf065ed76
Fix checks for duplicated config entries in IPMA (#98319)
* fix unique_id

* old unique id detection

* update tests

* match entry not unique_id

* address review
2023-08-16 12:56:47 +02:00
Emma Vanbrabant 8efb9dad7e
Add device_class to Renault charging remaining time (#98393)
* 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
2023-08-16 09:42:38 +02:00
Jan Bouwhuis c010b97abf
Improve test recovery MQTT certificate files (#98223)
* Improve test recovery MQTT certificate files

* Spelling
2023-08-16 09:07:14 +02:00
Erik Montnemery 3cf86d5d1f
Create a single entity for new met_eireann config entries (#98100) 2023-08-15 20:56:19 +02:00
Erik Montnemery caeb20f9c9
Modernize aemet weather (#97969)
* Modernize aemet weather

* Improve test coverage

* Only create a single entity for new config entries
2023-08-15 20:55:16 +02:00
Erik Montnemery 90413daa8a
Update buienweather data before adding entities (#98455)
* Update buienweather data before adding entities

* Fix tests
2023-08-15 18:15:23 +02:00
Marc Mueller 063ce9159d
Use asyncio.timeout [o-s] (#98451) 2023-08-15 17:21:49 +02:00
starkillerOG 92cf6ed2a0
Reolink 100% test coverage (#94763) 2023-08-15 09:50:17 -05:00
J. Nick Koston e209f3723e
Restore sensorpush state when device becomes available (#98420) 2023-08-15 09:29:25 -05:00
Erik Montnemery 3de402bd15
Fix AiohttpClientMockResponse.release (#98458) 2023-08-15 09:22:42 -05:00
Marc Mueller a9ade1f84d
Use asyncio.timeout [core] (#98447) 2023-08-15 08:36:05 -05:00
Marc Mueller e2d2ec8817
Use asyncio.timeout [b-e] (#98448) 2023-08-15 08:30:20 -05:00
Marc Mueller 8b0fdd6fd2
Use asyncio.timeout [s-z] (#98452) 2023-08-15 14:34:18 +02:00
G Johansson ed18c6a013
Refactor Rest Switch with ManualTriggerEntity (#97403)
* Refactor Rest Switch with ManualTriggerEntity

* Fix test

* Fix 2

* review comments

* remove async_added_to_hass

* update on startup
2023-08-15 11:43:47 +02:00
Erik Montnemery 3b9d6f2dde
Add setup function to the component loader (#98148)
* Add setup function to the component loader

* Update test

* Setup the loader in safe mode and in check_config script
2023-08-15 10:59:42 +02:00
Erik Montnemery 94ad4786c3
Include extended address in response to WS otbr/info (#98440) 2023-08-15 09:48:29 +02:00
Erik Montnemery e6ea70fd00
Adjust thread router discovery typing (#98439)
* Adjust thread router discovery typing

* Adjust debug logs
2023-08-15 09:40:05 +02:00
Erik Montnemery 71b92265af
Include border agent id in response to WS otbr/info (#98394)
* Include border agent id in response to WS otbr/info

* Assert border agent ID is not None
2023-08-15 09:17:47 +02:00
Erik Montnemery 6c7f50b5b2
Simplify error handling in otbr async_setup_entry (#98395)
* 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
2023-08-15 08:27:50 +02:00
Paulus Schoutsen ced4af1e22
Ignore smartthings storage on fresh install (#98418)
* Ignore smartthings storage on fresh install

* Also unload existing things when going for clean install

* Rename param

* Fix tests
2023-08-14 21:39:05 -05:00
Álvaro Fernández Rojas c3c00e6984
Update aioairzone to v0.6.6 (#98399) 2023-08-14 11:21:12 -05:00
Joakim Plate d6fcdeac06
Avoid leaking backtrace on connection lost in arcam (#98277)
* Avoid leaking backtrace on connection lost

* Correct ruff error after rebase
2023-08-14 18:03:17 +02:00
Franck Nijhof 85c2216cd7
Ensure headers middleware handles errors too (#98397) 2023-08-14 17:48:11 +02:00
Joost Lekkerkerker 77b421887b
Add entity translations for August (#98077) 2023-08-14 16:58:57 +02:00
Erik Montnemery d4753ebd3b
Include border agent ID in thread router discovery (#98378) 2023-08-14 16:46:55 +02:00
Erik Montnemery 1869177f08
Rename some incorrectly named assist_pipeline tests (#98389) 2023-08-14 15:47:55 +02:00
Erik Montnemery e0fd83daab
Store preferred border agent ID for each thread dataset (#98384) 2023-08-14 15:47:18 +02:00
Robert Resch b0f68f1ef3
Use @require_admin decorator (#98061)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2023-08-14 15:07:20 +02:00
G Johansson a093c383c3
Remove Verisure default lock code (#94676) 2023-08-14 13:43:08 +02:00