Commit Graph

21814 Commits (b80f7185b2e8e3a04727a59032a517cb87c9ce19)

Author SHA1 Message Date
epenet 8cbfc5a58b
Use service_calls fixture in arcam_fmj tests (#119274) 2024-06-10 13:09:51 +02:00
epenet b8e57f6174
Use relative imports in tests [a-i] (#119280) 2024-06-10 12:52:34 +02:00
epenet 42f3dd636f
Use service_calls fixture in bthome tests (#119268) 2024-06-10 10:05:47 +02:00
epenet a5cde4b32b
Use device_registry fixture in webostv tests (#119269) 2024-06-10 09:40:54 +02:00
epenet 1ebc1685f7
Improve type hints in camera tests (#119264) 2024-06-10 09:30:00 +02:00
epenet d9362a2f2f
Improve type hints in axis tests (#119260)
* Improve type hints in axis tests

* A couple more

* One more

* Improve light

* Improve hub

* Improve config-flow
2024-06-10 08:49:43 +02:00
epenet 2d2f5de191
Improve type hints in blueprint tests (#119263) 2024-06-10 08:49:18 +02:00
Diogo Gomes 0873322af7
Moves V2C from hass.data to config_entry.runtime_data (#119165)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-06-10 08:47:08 +02:00
epenet 733e563500
Improve type hints in blackbird tests (#119262) 2024-06-10 08:39:24 +02:00
Kevin Stillhammer 42e2c2b3e9
google_travel_time: Merge user_input validation (#119221) 2024-06-10 08:26:24 +02:00
Brett Adams 159503b8d3
Add model to Teslemetry Wall Connectors (#119251) 2024-06-10 07:48:09 +02:00
Joakim Plate 8a0cc55278
Always provide a currentArmLevel in Google assistant (#119238) 2024-06-10 07:47:16 +02:00
Jan Bouwhuis 4376e0931a
Add boiler entity state translations for incomfort water_heater entities (#119211) 2024-06-10 07:46:07 +02:00
Abílio Costa be22214a33
Fix wrong arg name in Idasen Desk config flow (#119247) 2024-06-10 03:02:38 +02:00
J. Nick Koston d657feafa6
Switch unifiprotect lib to use uiprotect (#119243) 2024-06-09 18:25:39 -05:00
Robert Svensson 325352e197
Fixture cleanup in UniFi tests (#119227)
* Make sure all mock_device_registry are used with usefixtuers

* Make sure to use name with fixtures and rename functions to start with fixture_

* Streamline config_entry_setup

* Type all *_payload

* Mark @pytest.mark.usefixtures("mock_default_requests")

* Clean up unnecessary newlines after docstring
2024-06-09 16:07:36 -04:00
epenet 7dfaa05793
Improve type hints in amberelectric tests (#119229) 2024-06-09 22:04:40 +02:00
epenet 06c1c435d1
Improve type hints in ambient_station tests (#119230) 2024-06-09 21:50:13 +02:00
Jan Bouwhuis 4ca38f227a
Fix - Remove unneeded assert in teslemetry test (#119219)
Remove unneded assert in teslemetry test
2024-06-09 19:21:37 +02:00
Brett Adams 38ab121db5
Add cabin overheat protection entity to Teslemetry (#118449)
* test_cabin_overheat_protection

* Fix snapshot

* Translate error

* Review Feedback
2024-06-09 18:30:36 +02:00
Joakim Plate 30e11ed068
Update links between config entry and device on sensor change in integral (#119213) 2024-06-09 18:26:33 +02:00
Kevin Stillhammer 93fa9e778b
Add reconfigure step for google_travel_time (#115178)
* Add reconfigure step for google_travel_time

* Do not allow to change name

* Duplicate tests for reconfigure

* Use link for description in strings.json

* Try except else

* Extend existing config flow tests
2024-06-09 18:13:32 +02:00
Joost Lekkerkerker b4c9b3f109
Create DWD device with unique_id instead of entry_id (#116498)
Co-authored-by: Matthias Alphart <farmio@alphart.net>
2024-06-09 16:36:36 +02:00
Erik Montnemery 04a5a1d18b
Improve demo config flow and add tests (#118481)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-06-09 16:02:58 +02:00
Joost Lekkerkerker b26f613d06
Add config flow to MPD (#117907) 2024-06-09 16:01:19 +02:00
Robert Svensson c9911e4dd4
Rework UniFi tests to not use runtime data (#119202) 2024-06-09 15:56:26 +02:00
Joost Lekkerkerker 279f183ce3
Remove Harmony switches (#119206) 2024-06-09 15:51:01 +02:00
J. Nick Koston d9f1d40805
Migrate august to use yalexs 5.2.0 (#119178) 2024-06-09 12:30:41 +02:00
Robert Svensson ff493a8a9d
Rewrite the UniFi button entity tests (#118771) 2024-06-09 12:25:06 +02:00
Shay Levy 04222c32b5
Handle Shelly BLE errors during connect and disconnect (#119174) 2024-06-09 11:59:40 +02:00
Robert Hillis a38d88730d
Remove Netgear LTE yaml import (#119180)
Remove Netgear LTE yaml config
2024-06-09 09:44:56 +02:00
J. Nick Koston ad7097399e
Ensure multiple executions of a restart automation in the same event loop iteration are allowed (#119100)
* Add test for restarting automation

related issue #119097

* fix

* add a delay since restart is an infinite loop

* tests
2024-06-08 17:07:39 -04:00
tronikos 0ca4314d48
Make supported_features of manual alarm_control_panel configurable (#119122) 2024-06-08 16:54:32 -04:00
Guy Shefer 7e1806229b
Fix Tami4 component breaking API changes (#119158)
* fix tami4 api breaking changes

* fix tests
2024-06-08 16:52:15 -04:00
Robert Svensson d6097573f5
Remove old UniFi test infrastructure (#119160)
Clean up hub
2024-06-08 16:44:24 -04:00
Sid 721b2c2ca8
Enable Ruff PT012 (#113957) 2024-06-08 17:59:08 +02:00
Robert Svensson 915658daa1
Fix failing UniFi tests related to utcnow (#119131)
* test

* Fix missed test
2024-06-08 17:58:47 +02:00
Paulus Schoutsen c49ca5ed56
Ensure intent tools have safe names (#119144) 2024-06-08 17:53:47 +02:00
Tom Brien fff2c1115d
Fix workday timezone (#119148) 2024-06-08 17:53:20 +02:00
Raman Gupta 2c41451abc
Add new security keys to zwave_js config flow (#115835) 2024-06-08 11:31:05 -04:00
Richard Kroegel 43343ea44a
Adjust BMW enum sensors translations (#118754)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-08 17:08:37 +02:00
Christian Neumeier a2504dafbc
Refactor Zeversolar init tests (#118551)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-06-08 16:34:17 +02:00
epenet 5166426d0a
Add type hints for service_calls fixture in pylint plugin (#118356) 2024-06-08 16:32:27 +02:00
Richard Kroegel b04a65f4d1
Change BMW select and sensor enums to lowercase (#118751)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-08 16:25:45 +02:00
Maciej Bieniek cb672b85f4
Add icon translations to AccuWeather (#119134)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-08 15:57:22 +02:00
Maciej Bieniek 27df79daf1
Use translation placeholders in AccuWeather (#118760)
* Use translation placeholder

* Update test snapshot

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-08 14:00:55 +02:00
Joost Lekkerkerker 53f1cd8e72
Improve withings diagnostics (#119128) 2024-06-08 12:27:24 +02:00
Joost Lekkerkerker 522a1e9d56
Add support for segmental measurements in Withings (#119126) 2024-06-08 11:56:23 +02:00
t0bst4r deac59f1ee
Add intelligent language matching for Google Assistant SDK Agents (#112600)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-06-08 09:50:15 +02:00
tronikos f605c10f42
Properly handle escaped unicode characters passed to tools in Google Generative AI (#119117) 2024-06-08 09:02:00 +02:00
Brett Adams e4be3d8435
Improve the reliability of tests in Tessie (#118596) 2024-06-07 22:11:35 +02:00
Robert Svensson 20df747806
Use fixtures in UniFi device tracker tests (#118912) 2024-06-07 21:28:02 +02:00
Erik Montnemery 6c15351c18
Add support for common references in strings.json (#118783)
* Add support for common references in strings.json

* Update tests
2024-06-07 20:59:26 +02:00
epenet b2a54c50e2
Move mock_zeroconf to decorator in tests (#119061) 2024-06-07 20:55:20 +02:00
epenet 4a4c98caad
Move mock_async_zeroconf to decorator in zeroconf tests (#119063) 2024-06-07 20:49:58 +02:00
OzGav aa121ebf73
Add previous track intent (#113222)
* add previous track intent

* add stop and clear playlist

* Remove clear_playlist and stop

* Remove clear_playlist and stop

* Use extra constraints

---------

Co-authored-by: Michael Hansen <mike@rhasspy.org>
2024-06-07 13:34:22 -05:00
epenet cd7f2f9f77
Fix incorrect type hints in azure_data_explorer tests (#119065) 2024-06-07 20:07:38 +02:00
epenet 9008b4295c
Improve type hints in assist_pipeline tests (#119066) 2024-06-07 12:39:25 -05:00
paulusbrand 624017a0f9
Add template Base64 decode encoding parameter (#116603)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-07 17:01:35 +02:00
epenet 37b0e8fa33
Improve type hints in airvisual test fixtures (#119079) 2024-06-07 07:35:33 -06:00
epenet 5bf42e64e3
Improve type hints in arcam_fmj tests (#119072) 2024-06-07 15:33:43 +02:00
epenet 549f66fd6f
Move mock_async_zeroconf to decorator in homekit tests (#119060) 2024-06-07 12:30:02 +02:00
Robert Svensson a8becb1248
Use fixtures in UniFi sensor tests (#118921) 2024-06-07 12:15:03 +02:00
Joost Lekkerkerker f6c66dfd27
Bump aiowithings to 3.0.1 (#118854) 2024-06-07 12:11:15 +02:00
epenet bfff3c0524
Add type hint to mock_async_zeroconf in test fixtures (#119057) 2024-06-07 12:09:18 +02:00
epenet 5f309b69cf
Add type hints to current_request_with_host in tests (#119054) 2024-06-07 11:40:23 +02:00
epenet 907297cd1a
Improve type hints in config tests (#119055) 2024-06-07 11:40:03 +02:00
epenet 1c8a9cc3b8
Remove unused caplog fixtures in tests (#119056) 2024-06-07 11:38:56 +02:00
epenet b3a71dcea3
Improve type hints in homekit_controller tests (#119053) 2024-06-07 11:31:45 +02:00
Mike Degatano 78f53341b7
Always have addon url in detached_addon_missing (#119011) 2024-06-07 10:52:15 +02:00
epenet 42b1cfe6b9
Improve type hints in azure_event_hub tests (#119047)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-06-07 10:50:03 +02:00
epenet 7638380add
Improve type hints in kaleidescape tests (#119040) 2024-06-07 10:49:09 +02:00
epenet c107d980fa
Improve type hints in motionblinds_ble tests (#119049) 2024-06-07 10:43:56 +02:00
epenet d5a68ad311
Improve type hints in zamg tests (#119042) 2024-06-07 10:25:11 +02:00
Lorenzo Monaco 78c7af40ed
Ecovacs get_positions service (#118572)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-07 10:11:49 +02:00
J. Nick Koston 6ba8b7a5d6
Remove isal from after_dependencies in http (#119000) 2024-06-07 09:21:53 +02:00
epenet 4f6a98cee3
Remove unused request fixtures (#119044) 2024-06-07 09:19:03 +02:00
Joost Lekkerkerker 6027af3d36
Fix unit of measurement for airgradient sensor (#118981) 2024-06-07 09:17:36 +02:00
epenet 8628a1e449
Improve type hints in airnow tests (#119038) 2024-06-07 09:03:35 +02:00
Marc Mueller 274cd41d57
Fix Generator annotations in tests (1) (#119018) 2024-06-07 08:43:32 +02:00
Marc Mueller 7195a21126
Fix Generator annotations in tests (2) (#119019) 2024-06-07 08:34:38 +02:00
Maciej Bieniek 27e8a4ed6f
Add the missing humidity value to the Accuweather daily forecast (#119013)
Add the missing humidity value to the daily forecast

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-07 07:23:44 +02:00
Michael Hansen 87114bf19b
Fix exposure checks on some intents (#118988)
* Check exposure in climate intent

* Check exposure in todo list

* Check exposure for weather

* Check exposure in humidity intents

* Add extra checks to weather tests

* Add more checks to todo intent test

* Move climate intents to async_match_targets

* Update test_intent.py

* Update test_intent.py

* Remove patch
2024-06-06 20:41:25 -05:00
Matthias Alphart a7429e5f50
Fix KNX `climate.set_hvac_mode` not turning `on` (#119012) 2024-06-06 22:40:04 +02:00
Jordi 7219a4fa98
Add Aquacell integration (#117117)
* Initial commit

* Support changed API
Change sensor entity descriptions

* Fix sensor not handling coordinator update

* Implement re-authentication flow and handle token expiry

* Bump aioaquacell

* Bump aioaquacell

* Cleanup and initial tests

* Fixes for config flow tests

* Cleanup

* Fixes

* Formatted

* Use config entry runtime
Use icon translations
Removed reauth
Removed last updated sensor
Changed lid in place to binary sensor
Cleanup

* Remove reauth strings

* Removed binary_sensor platform
Fixed sensors not updating properly

* Remove reauth tests
Bump aioaquacell

* Moved softener property to entity class
Inlined validate_input method
Renaming of entities
Do a single async_add_entities call to add all entities
Reduced code in try blocks

* Made tests parameterized and use test fixture for api
Cleaned up unused code
Removed traces of reauth

* Add check if refresh token is expired
Add tests

* Add missing unique_id to config entry mock
Inlined _update_config_entry_refresh_token method
Fix incorrect test method name and comment

* Add snapshot test
Changed WiFi level to WiFi strength

* Bump aioaquacell to 0.1.7

* Move test_coordinator tests to test_init
Add test for duplicate config entry
2024-06-06 22:33:58 +02:00
Robert Svensson ec3a976410
Use fixtures in UniFi image tests (#118887) 2024-06-06 14:23:10 -04:00
Robert Svensson d695660164
Use fixtures in UniFi diagnostics tests (#118905) 2024-06-06 14:22:41 -04:00
Michael Hansen bca8958d4b
Prioritize literal text with name slots in sentence matching (#118900)
Prioritize literal text with name slots
2024-06-06 14:20:34 -04:00
Steven B 333ac56904
Fully mock the ring_doorbell api and remove requests_mock (#113140)
* Fully mock ring_doorbell library

* Add comments and docstrings

* Simplify devices_mocks and fake RingDevices

* Update post review

* Consolidate device filtering in conftest

* Fix ruff lambda assignment failure

* Fix ruff check fail

* Update post review
2024-06-06 20:13:19 +02:00
Mr. Bubbles 99b85e16d1
Set username as entry title in Bring integration (#118974)
Set username as entry title
2024-06-06 20:03:58 +02:00
J. Nick Koston 62b1bde0e8
Only entity verify state writable once after success unless hass is missing (#118896) 2024-06-06 11:46:44 -05:00
epenet 5914ff0de8
Improve type hints in apple_tv tests (#118980) 2024-06-06 17:44:22 +02:00
Marc Mueller 837ee7c4fb
Import Generator from typing_extensions (4) (#118992) 2024-06-06 17:41:37 +02:00
Marc Mueller 59e178df3b
Import Generator from typing_extensions (5) (#118993) 2024-06-06 17:33:27 +02:00
epenet 632238a7f9
Move mock_bluetooth* fixtures to decorator (#118846) 2024-06-06 17:31:08 +02:00
Marc Mueller 33ed4fd862
Import Generator from typing_extensions (3) (#118990) 2024-06-06 17:28:59 +02:00
epenet fb51163075
Move socket_enabled fixture to decorator (#118847) 2024-06-06 17:27:38 +02:00
epenet 6de26ca811
Unhide facebook tests (#118867) 2024-06-06 17:24:48 +02:00
Marc Mueller 279483ddb0
Import Generator from typing_extensions (2) (#118989) 2024-06-06 17:24:22 +02:00
Rami Mosleh cab58fa9b2
Check if imap message text has a value instead of checking if its not None (#118901)
* Check if message_text has a value instead of checking if its not None

* Strip message_text to ensure that its actually empty or not

* Add test with multipart payload having empty plain text
2024-06-06 14:10:03 +02:00
Sebastian Lövdahl a5959cfb83
Address post-merge review comments from Vallox reconfigure support PR (#118903)
Address late review comments from Vallox reconfigure support PR
2024-06-06 12:52:57 +02:00
epenet 622a69447d
Add type hints to hdmi_cec assert_state function (#118940)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-06-06 12:39:24 +02:00
epenet 857b5c9c1b
Fix type hints in google tests (#118941) 2024-06-06 12:19:41 +02:00
epenet 492b158818
Add return type hints in tests (a-i) (#118939) 2024-06-06 12:17:08 +02:00
Mr. Bubbles 6e8d6f5994
Load fixture with decorator to avoid variable not accessed error (#118954)
Use fixture decorator
2024-06-06 12:15:13 +02:00
epenet f425420899
Improve type hints in rainforest_raven tests (#118950) 2024-06-06 12:10:13 +02:00
epenet c373e36995
Centralize duplicate fixtures in rainforest_raven tests (#118945) 2024-06-06 10:44:02 +02:00
epenet 7eda8aafc8
Ignore nested functions when enforcing type hints in tests (#118948) 2024-06-06 10:43:31 +02:00
Mr. Bubbles 093e85d59a
Fix some minor typos in ista EcoTrend integration (#118949)
Fix typos
2024-06-06 10:43:12 +02:00
epenet c7cc465e5c
Add return type hints in tests (k-z) (#118942) 2024-06-06 10:11:29 +02:00
J. Nick Koston f9205cd88d
Avoid additional timestamp conversion to set state (#118885)
Avoid addtional timestamp conversion to set state

Since we already have the timestamp, we can pass it on to the State
object and avoid the additional timestamp conversion which can be as
much as 30% of the state write runtime.

Since datetime objects are limited to microsecond precision, we need
to adjust some tests to account for the additional precision that we
will now be able to get in the database
2024-06-05 23:43:34 -04:00
J. Nick Koston 475c20d529
Always do thread safety check when writing state (#118886)
* Always do thread safety check when writing state

Refactor the 3 most common places where the thread safety check
for the event loop to be inline to make the check fast enough
that we can keep it long term. While code review catches most
of the thread safety issues in core, some of them still make
it through, and new ones keep getting added. Its not possible
to catch them all with manual code review, so its worth the
tiny overhead to check each time.

Previously the check was limited to custom components
because they were the most common source of thread
safety issues.

* Always do thread safety check when writing state

Refactor the 3 most common places where the thread safety check
for the event loop to be inline to make the check fast enough
that we can keep it long term. While code review catches most
of the thread safety issues in core, some of them still make
it through, and new ones keep getting added. Its not possible
to catch them all with manual code review, so its worth the
tiny overhead to check each time.

Previously the check was limited to custom components
because they were the most common source of thread
safety issues.

* async_fire is more common than expected with ccs

* fix mock

* fix hass mocking
2024-06-05 23:41:55 -04:00
Jan-Philipp Benecke 7407995ff1
Fix flaky Google Assistant test (#118914)
* Fix flaky Google Assistant test

* Trigger full ci
2024-06-05 17:37:14 -04:00
Erik Montnemery 8099ea8817
Improve WS command validate_config (#118864)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-05 18:53:44 +02:00
Robert Resch 0562c3085f
Replace slave by meter in v2c (#118893) 2024-06-05 18:21:03 +02:00
r-xyz 0487b38ed3
Add support for sending telegram messages to topics (#112715)
* Add support for sending telegram messages to topics
    Based on original PR #104059 by [jgresty](https://github.com/jgresty).
    Did not manage to merge conflicts, so I remade the changes from scratch, including suggestions from previous PR reviews.

    Topics were added to telegram groups in November 2022, and to the
    telegram-bot library in version 20.0. They are a purely additive change
    that is exposed by a single parameter `message_thread_id`. Not passing
    this parameter will not change the behaviour from current.

    This same parameter is used to send messages to threads and messages to
    topics inside groups.

    https://telegram.org/blog/topics-in-groups-collectible-usernames/it?setln=en#topics-in-groups

    Fixes #81888
    Fixes #91750

* telegram_bot: add tests for threads feature.

* telegram_bot: fixed tests for threads.

* telegram_bot: fixed wrong line.

* Update test_telegram_bot.py

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-06-05 17:41:40 +02:00
Robert Svensson 862c04a4b6
Use fixtures in UniFi service tests (#118838)
* Use fixtures in UniFi service tests

* Fix comments
2024-06-05 17:04:28 +02:00
Joost Lekkerkerker c4cfd9adf0
Add entity translations to incomfort (#118876) 2024-06-05 17:03:58 +02:00
Joost Lekkerkerker 60c06732b1
Add state and device class to incomfort (#118877)
* Add state and device class to incomfort

* Add state and device class to incomfort
2024-06-05 16:06:23 +02:00
Josef Zweck d0a036c617
Allow more input params to webhook generate_url helper (#112334)
* allow more params to helper

* switch back to f-string

* add test

* switch to proper method

* add allow_external, internal params

* fx default

* add signature comparison

* remove test, change prefer_external

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-06-05 15:55:37 +02:00
Jan Bouwhuis 066cd6dbef
Improve repair issue when notify service is still being used (#118855)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-06-05 15:41:22 +02:00
Pete Sage 0d1fb1fc9f
Fix Hydrawise sensor availability (#118669)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-05 14:18:41 +02:00
epenet 4b663dbf01
Rename esphome fixture (#118865) 2024-06-05 13:31:59 +02:00
Jan Bouwhuis 9a510cfe32
Add data coordinator to incomfort integration (#118816)
* Add data coordinator to incomfort integration

* Remove unused code and redundant comment, move entity class

* Use freezer

* Cleanup snapshot

* Use entry.runtime_data

* Use freezer, use mock_config_entry

* Use tick

* Use ConfigEntryError while we do not yet support a re-auth flow, update tests

* Use tick with async_fire_time_changed
2024-06-05 10:45:01 +02:00
epenet 9c8aa8456e
Move enable_bluetooth fixture to decorator (#118849) 2024-06-05 09:20:48 +02:00
epenet c7e065c413
Move enable_custom_integrations fixture to decorator (#118844) 2024-06-05 09:20:08 +02:00
Diogo Gomes ba7f82d5e2
Add diagnostic to V2C (#118823)
* add diagnostic platform

* add diagnostic platform

* add diagnostic platform
2024-06-05 08:55:49 +02:00
starkillerOG 8723441227
Add Reolink serial number to device info of IPC camera (#118834)
* Add UID to dev info

* Add camera_uid to test
2024-06-04 21:37:40 -04:00
J. Nick Koston ed0568c655
Ensure config entries are not unloaded while their platforms are setting up (#118767)
* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* run with error on to find them

* cert_exp, hold lock

* cert_exp, hold lock

* shelly async_late_forward_entry_setups

* compact

* compact

* found another

* patch up mobileapp

* patch up hue tests

* patch up smartthings

* fix mqtt

* fix esphome

* zwave_js

* mqtt

* rework

* fixes

* fix mocking

* fix mocking

* do not call async_forward_entry_setup directly

* docstrings

* docstrings

* docstrings

* add comments

* doc strings

* fixed all in core, turn off strict

* coverage

* coverage

* missing

* coverage
2024-06-04 21:34:39 -04:00
J. Nick Koston 67b3be8432
Remove useless threading locks in mqtt (#118737) 2024-06-04 14:21:03 -05:00
Robert Svensson b4f6325278
Use fixtures in UniFi switch tests (#118831) 2024-06-04 21:01:03 +02:00
Robert Svensson c2e245f9d4
Use fixtures in UniFi update tests (#118818) 2024-06-04 21:00:50 +02:00
arturyak 513262c0ff
Add missing FAN_ONLY mode to ccm15 (#118804) 2024-06-04 20:58:58 +02:00
Tsvi Mostovicz 98455cbd93
Fix updating options in Jewish Calendar (#118643) 2024-06-04 20:55:38 +02:00
Jan Bouwhuis 956623d964
Fix device name not set on all incomfort platforms (#118827)
* Prelimenary tests for incomfort integration

* Use snapshot_platform

* Use helper

* Ensure the device name is set in device info

* Move snapshot tests to platform test modules

* Move unused snapshot file

* Naming and docstr

* update snapshots

* cleanup snapshots

* Add water heater tests
2024-06-04 20:51:34 +02:00
J. Nick Koston 72e4aee155
Ensure name of task is logged for unhandled loop exceptions (#118822) 2024-06-04 12:48:29 -04:00
Maciej Bieniek 709e32a38a
Check if Shelly `entry.runtime_data` is available (#118805)
* Check if runtime_data is available

* Add tests

* Use `is` operator

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-04 18:40:18 +02:00
epenet b81f0b600f
Move current_request_with_host fixture to decorator (#118810)
* Move current_request_with_host fixture to decorator

* One more
2024-06-04 17:50:22 +02:00
Paulus Schoutsen 52ad90a68d
Include script description in LLM exposed entities (#118749)
* Include script description in LLM exposed entities

* Fix race in test

* Fix type

* Expose script

* Remove fields
2024-06-04 11:18:07 -04:00
ollo69 8610436948
Add remote entity to AndroidTV (#103496)
* Add remote entity to AndroidTV

* Add tests for remote entity

* Requested changes on tests
2024-06-04 17:02:30 +02:00
epenet b09f3eb313
Fix incorrect current_request_with_host type hint (#118809) 2024-06-04 16:26:39 +02:00
epenet 80975d7a63
Move None bluetooth fixtures to decorator (#118802) 2024-06-04 16:26:07 +02:00
epenet f120f55d86
Move enable_bluetooth fixture to decorator (#118803) 2024-06-04 16:20:11 +02:00
epenet 3d31af3eb4
Move entity_registry_enabled_by_default to decorator [a-p] (#118794) 2024-06-04 16:18:42 +02:00
epenet 089874f818
Move mock_hass_config fixture to decorator (#118807) 2024-06-04 16:05:56 +02:00
Joost Lekkerkerker 2ac5f8db06
Set unique id in aladdin connect config flow (#118798) 2024-06-04 16:00:53 +02:00
Richard Kroegel 1eb13b48a2
Add tests for BMW binary_sensor and lock (#118436)
* BMW: Add tests for binary_sensor & lock

* Use entity_registry_enabled_by_default fixture

* Update tests/components/bmw_connected_drive/test_binary_sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Move fixtures to decorator

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Use fixture decorators if possible

* Fix rebase

* Spelling adjustments

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Use snapshot_platform helper

* Spelling

* Remove comment

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-06-04 15:08:15 +02:00
epenet 20b5aa3e0e
Move entity_registry_enabled_by_default to decorator [q-z] (#118793) 2024-06-04 13:38:32 +02:00
epenet 3ac0fa53c8
Cleanup unused FixtureRequest in tests (#118780) 2024-06-04 11:49:21 +02:00
Aidan Timson 42414d55e0
Azure DevOps build sensor attributes to new sensors (#114948)
* Setup for split

* Adjust to allow for None

* Create

* Add missing

* Fix datetime parsing in Azure DevOps sensor

* Remove definition id and name

These aren't needed and will never change

* Add tests for each sensor

* Add tests for edge cases

* Rename translations

* Update

* Use base sensor descriptions

* Remove

* Drop status

using this later for an event entity

* Switch to timestamp

* Switch to timestamp

* Merge

* Update snapshot

* Improvements from @joostlek

* Update homeassistant/components/azure_devops/sensor.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-06-04 10:50:43 +02:00
Mr. Bubbles 7815840194
Add ista EcoTrend integration (#118360)
* Add ista EcoTrend integration

* move code out of try

* Use account owners name as entry title

* update config flow tests

* add tests for init

* Add reauth flow

* Add tests for sensors

* add translations for reauth

* trigger statistics import on first refresh

* Move statistics and reauth flow to other PR

* Fix tests

* some changes

* draft_final_final

* remove unnecessary icons

* changed tests

* move device_registry test to init

* add text selectors
2024-06-04 10:45:53 +02:00
epenet b54a68750b
Add type hints for FixtureRequest in tests (#118779) 2024-06-04 10:37:54 +02:00
Richard Kroegel 7fb2802910
Allow per-sensor unit conversion on BMW sensors (#110272)
* Update BMW sensors to use device_class

* Test adjustments

* Trigger CI

* Remove unneeded cast

* Set suggested_display_precision to 0

* Rebase for climate_status

* Change charging_status to ENUM device class

* Add test for Enum translations

* Pin Enum sensor values

* Use snapshot_platform helper

* Remove translation tests

* Formatting

* Remove comment

* Use const.STATE_UNKOWN

* Fix typo

* Update strings

* Loop through Enum sensors

* Revert enum sensor changes

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-04 09:06:23 +02:00
J. Nick Koston 553311cc7d
Add os.walk to asyncio loop blocking detection (#118769) 2024-06-04 06:53:37 +02:00
Jan Bouwhuis e799270578
Recover mqtt abbrevations optimizations (#118762)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-06-04 06:20:18 +02:00
Michael Hansen 0257aa4839
Clean up exposed domains (#118753)
* Remove lock and script

* Add media player

* Fix tests
2024-06-03 21:26:40 -05:00
J. Nick Koston 35a1ecea27
Speed up statistics_during_period websocket api (#118672) 2024-06-03 18:08:46 -05:00
Jan Bouwhuis 39f5f30ca9
Revert "Allow MQTT device based auto discovery" (#118746)
Revert "Allow MQTT device based auto discovery (#109030)"

This reverts commit 585892f067.
2024-06-03 22:30:37 +02:00
Paulus Schoutsen 299c0de968
Update OpenAI prompt on each interaction (#118747) 2024-06-03 22:27:05 +02:00
Joost Lekkerkerker 2a92f78453
Require firmware version 3.1.1 for airgradient (#118744) 2024-06-03 21:08:28 +02:00
Jan Bouwhuis dd1dd4c6a3
Migrate Intergas InComfort/Intouch Lan2RF gateway YAML to config flow (#118642)
* Add config flow

* Make sure the device is polled - refactor

* Fix

* Add tests config flow

* Update test requirements

* Ensure dispatcher has a unique signal per heater

* Followup on review

* Follow up comments

* One more docstr

* Make specific try blocks and refactoring

* Handle import exceptions

* Restore removed lines

* Move initial heater update in try block

* Raise issue failed import

* Update test codeowners

* Remove entity device info

* Remove entity device info

* Appy suggestions from code review

* Remove broad exception handling from entry setup

* Test coverage
2024-06-03 20:37:48 +02:00
tronikos f9dff1632e
Use ISO format when passing date to LLMs (#118705) 2024-06-03 19:48:50 +02:00
Richard Kroegel 60bcd27a47
Use snapshot_platform helper for BMW tests (#118735)
* Use snapshot_platform helper

* Remove comments

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-03 19:46:04 +02:00
Joost Lekkerkerker 16485af7fc
Configure device in airgradient config flow (#118699) 2024-06-03 19:23:07 +02:00
Diogo Gomes 91ca7db02f
Address reviews comments in #117147 (#118714) 2024-06-03 19:22:00 +02:00
epenet 5d594a509c
Add type hints for MockAgent in conversation tests (#118701) 2024-06-03 17:44:13 +02:00
epenet f178467b0e
Add type hints for TTS test fixtures (#118704) 2024-06-03 17:43:18 +02:00
epenet dd90fb15e1
Fix incorrect type hint in dremel_3d_printer tests (#118709) 2024-06-03 17:16:48 +02:00
Erik Montnemery 99e02fe2b2
Remove tag_id from tag store (#118713) 2024-06-03 17:15:57 +02:00
Paulus Schoutsen bdcfd93129
Automatically fill in slots based on LLM context (#118619)
* Automatically fill in slots from LLM context

* Add tests

* Apply suggestions from code review

Co-authored-by: Allen Porter <allen@thebends.org>

---------

Co-authored-by: Allen Porter <allen@thebends.org>
2024-06-03 10:36:41 -04:00
epenet 771ed33b14
Bump renault-api to 0.2.3 (#118718) 2024-06-03 15:53:23 +02:00
Joost Lekkerkerker c32eb97ac0
Disable both option in Airgradient select (#118702) 2024-06-03 15:49:51 +02:00
Jake Martin a3b60cb054
Add Monzo config reauth (#117726)
* Add reauth config flow

* Trigger reauth on Monzo AuthorisaionExpiredError

* Add missing abort strings

* Use FlowResultType enum

* One extra == swapped for is

* Use helper in reauth

* Patch correct function in reauth test

* Remove unecessary **

* Swap patch and calls check for access token checks

* Do reauth trigger test without patch

* Remove unnecessary str() on user_id - always str anyway

* Update tests/components/monzo/test_config_flow.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-06-03 13:18:15 +02:00
Richard Kroegel ef7c7f1c05
Refactor fixture calling for BMW tests (#118708)
* Refactor BMW tests to use pytest.mark.usefixtures

* Fix freeze_time

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-03 13:16:12 +02:00
Erik Montnemery 765114bead
Don't store tag_id in tag storage (#118707) 2024-06-03 13:11:00 +02:00
Erik Montnemery 35dcda29b9
Use ULID instead of UUID for config entry id and flow ID (#118677) 2024-06-03 10:34:09 +02:00
epenet 6cf7889c38
Add type hints for requests_mock.Mocker in test fixtures (#118678) 2024-06-03 10:30:08 +02:00
epenet 9be972b13e
Add type hints for list[Device] in test fixtures (#118681) 2024-06-03 10:21:24 +02:00
epenet f39dd40be1
Add type hints for hass_storage in test fixtures (#118682) 2024-06-03 10:20:57 +02:00
epenet fdec1b0b16
Add type hints for ClientSessionGenerator in test fixtures (#118689) 2024-06-03 10:19:49 +02:00
epenet 77c627e6f3
Fix incorrect blueprint type hints in tests (#118694) 2024-06-03 10:19:13 +02:00
epenet d5eebb202b
Remove unused fixture from elmax tests (#118684) 2024-06-03 10:18:36 +02:00
epenet 8772a59f5c
Add type hints for Recorder in test fixtures (#118685) 2024-06-03 10:17:51 +02:00
epenet 666fc2333a
Add type hints for AiohttpClientMocker in test fixtures (#118691) 2024-06-03 10:13:22 +02:00
epenet c93d42d59b
Add type hints for FrozenDateTimeFactory in test fixtures (#118690) 2024-06-03 10:12:58 +02:00
J. Nick Koston 134088e1f6
Revert "Add websocket API to get list of recorded entities (#92640)" (#118644)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-06-03 10:11:24 +02:00
epenet 1db7c7946e
Add type hints for MqttMockHAClient in test fixtures (#118683) 2024-06-03 09:29:15 +02:00
epenet 9a5706fa30
Add type hints for pytest.LogCaptureFixture in test fixtures (#118687) 2024-06-03 09:28:54 +02:00
G Johansson 6a8a975fae
Remove config flow import from fastdotcom (#118665) 2024-06-02 21:04:35 -04:00
G Johansson dd1d21c77a
Fix entity state dispatching for Tag entities (#118662) 2024-06-02 20:41:16 -04:00
puddly 746939c8cd
Bump ZHA dependencies (#118658)
* Bump bellows to 0.39.0

* Do not create a backup if there is no active ZHA gateway object

* Bump universal-silabs-flasher as well
2024-06-02 16:55:48 -04:00
Jan Bouwhuis 375f48142c
Fix handling undecoded mqtt sensor payloads (#118633) 2024-06-02 21:25:05 +02:00
Maciej Bieniek afc29fdbe7
Add support for the DS18B20 temperature sensor to Nettigo Air Monitor integration (#118601)
Add support for DS18B20 temperature sensor

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-02 20:55:36 +02:00
epenet 37fc16d7b6
Fix incorrect `patch` type hint in main conftest (#118461) 2024-06-02 15:34:30 +02:00
J. Nick Koston 8f94205014
Include a traceback for non-strict event loop blocking detection (#118620) 2024-06-02 06:36:25 -04:00
Maciej Bieniek 649d6ec11a
Bump `nettigo_air_monitor` library to version `3.2.0` (#118600)
* Bump nam to version 3.2.0

* Update test snapshot

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-01 18:10:45 +02:00
Dave T b69789d056
Don't prompt user to verify still image if none was provided in generic camera (#118599)
Skip user prompt for preview image if only stream
2024-06-01 10:30:32 -04:00
epenet 6115dffd80
Cleanup pylint ignore in melnor tests (#118564) 2024-06-01 08:03:32 +02:00
tronikos a4612143e6
Use gemini-1.5-flash-latest in google_generative_ai_conversation.generate_content (#118594) 2024-05-31 21:57:14 -07:00
tronikos 7af469f81e
Strip Google AI text responses (#118593)
* Strip Google AI test responses

* strip each part
2024-05-31 21:55:52 -07:00