98 Commits

Author SHA1 Message Date
Erik Montnemery
4b34d1bbb5
Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f32a2e25d141ff467e5958826ed9fc3a.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Improve docstrings and strings.json

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
Shay Levy
239f2dcb3e
Fix LG webOS TV turn off when device is already off (#137675) 2025-02-07 15:25:09 +01:00
Shay Levy
4613087e86
Add serial number to LG webOS TV device info (#136968) 2025-01-31 08:23:03 +01:00
Shay Levy
55fc01be8e
Fix LG webOS TV actions not returning responses (#136743) 2025-01-28 20:55:06 +02:00
Shay Levy
47efb68780
Add missing translations for LG webOS TV and fix names (#136438) 2025-01-24 14:13:10 +01:00
Shay Levy
fe67069c91
Add translated action exceptions to LG webOS TV (#136397)
* Add translated action exceptions to LG webOS TV

* Apply suggestions from code review

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-01-24 02:07:24 +02:00
Shay Levy
66f945e852
Bump aiowebostv to 0.6.0 (#136206) 2025-01-23 13:51:24 +01:00
Shay Levy
8d99a54656
Bump aiowebostv to 0.5.0 (#136097) 2025-01-20 08:31:45 -10:00
epenet
64500e837f
Use new ServiceInfo location in component tests (part 1) (#136057) 2025-01-20 13:09:34 +01:00
Shay Levy
ba9ad009e9
Fix LG webOS TV trigger validation (#135312)
* Fix LG webOS TV trigger validation

* Raise if not loaded
2025-01-13 15:37:40 +02:00
Shay Levy
a745e079e9
Add reconfigure to LG webOS TV (#135360)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-01-11 16:16:35 +01:00
Shay Levy
6fd4d7acaa
Use runtime_data in LG webOS TV (#135301) 2025-01-10 19:16:25 +02:00
Shay Levy
9d1989125f
Fix LG webOS TV media player test coverage (#135225)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-01-10 10:44:23 +01:00
Shay Levy
07482de4ab
Fix LG webOS TV init test coverage (#135194) 2025-01-09 18:29:17 +01:00
Shay Levy
bb4a497247
Impove LG webOS TV tests quality (#135130)
* Impove LG webOS TV tests quality

* Review comments
2025-01-08 23:12:09 +02:00
Shay Levy
43ec63eabc
Cleanup LG webOS TV name (#135028) 2025-01-08 12:06:02 +01:00
Shay Levy
fea4a00424
Remove LG WebOS TV legacy uuid migration (#134671) 2025-01-04 15:31:36 +01:00
Erik Montnemery
ecb3bf79f3
Revert "Add support for subentries to config entries" (#133470)
Revert "Add support for subentries to config entries (#117355)"

This reverts commit ad15786115673c5b3fe40ea2f5d61b4b896f433e.
2024-12-18 13:51:05 +01:00
Erik Montnemery
ad15786115
Add support for subentries to config entries (#117355)
* Add support for subentries to config entries

* Improve error handling and test coverage

* Include subentry_id in subentry containers

* Auto-generate subentry_id and add optional unique_id

* Tweak

* Update tests

* Fix stale docstring

* Address review comments

* Typing tweaks

* Add methods to ConfigEntries to add and remove subentry

* Improve ConfigSubentryData typed dict

* Update test snapshots

* Adjust tests

* Fix unique_id logic

* Allow multiple subentries with None unique_id

* Add number of subentries to config entry JSON representation

* Add subentry translation support

* Allow integrations to implement multiple subentry flows

* Update translations schema

* Adjust exception text

* Change subentry flow init step to user

* Prevent creating a subentry with colliding unique_id

* Update tests

* Address review comments

* Remove duplicaetd unique_id collision check

* Remove change from the future

* Improve test coverage

* Add default value for unique_id
2024-12-12 20:16:18 +01:00
Erik Montnemery
d82bff1bc2
Index config entry discovery_keys by discovery domain (#126563)
* Index config entry discovery_keys by discovery domain

* Add new signal

* Update tests

* Update homeassistant/config_entries.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Fix imports

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 21:48:11 +02:00
Erik Montnemery
b2982c18bb
Reinitialize zeroconf discovery flow on unignore (#125753)
* Reinitialize zeroconf discovery flow on unignore

* Adjust tests

* Improve comments

* Fix logic for updating discovery keys

* Add tests

* Use mock_config_flow helper in new config_entries test

* Add discovery_keys attribute to ConfigEntry

* Update zeroconf rediscovery

* Change type of ConfigEntry.discovery_keys

* Update tests

* Fix DiscoveryKey.from_json_dict and add tests

* Fix test

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 16:49:21 +02:00
epenet
edad766fd3
Use start_reauth helper method in integration tests (u-z) (#124796) 2024-08-28 16:51:16 +02:00
epenet
c2dc4ef215
Add missing hass type hint in component tests (w) (#124284) 2024-08-20 12:54:42 +02:00
Robert Resch
ad50136dbd
Add created_at/modified_at to config entries (#122456) 2024-07-29 22:08:46 +02:00
Shay Levy
b14f22926a
Fix WebOS TV media player status when OFF after IDLE (#121251) 2024-07-05 00:19:24 +03:00
epenet
83fac6192d
Use service_calls fixture in webostv tests (#120999) 2024-07-04 23:07:38 +03:00
epenet
73716ea529
Add monkeypatch type hints to webostv tests (#121054)
* Add monkeypatch type hints to webostv

* Improve
2024-07-03 23:49:31 +03:00
Marc Mueller
f11b316dac
Import Generator from collections.abc (4) (#120917) 2024-07-01 11:54:42 +02:00
epenet
a5cde4b32b
Use device_registry fixture in webostv tests (#119269) 2024-06-10 09:40:54 +02:00
Marc Mueller
59e178df3b
Import Generator from typing_extensions (5) (#118993) 2024-06-06 17:33:27 +02:00
epenet
98d24dd276
Improve typing for calls fixture in tests (m-z) (#118350)
* Improve typing for `calls` fixture in tests (m-z)

* More

* More
2024-05-29 09:30:41 +02:00
Shay Levy
6a0e7cfea5
Clean up WebOS TV unneccesary async_block_till_done calls (#118142) 2024-05-26 00:37:44 +03:00
rale
a6fdd4e1e2
Report webOS media player state (#113774)
* support for webos media player state

* add test coverage and don't use assumed state if media player state is available

* fallback to assumed state if media state isn't available

Co-authored-by: Shay Levy <levyshay1@gmail.com>

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2024-04-29 21:43:46 +03:00
epenet
9204ccfa17
Use is in ConfigEntryState enum comparison in tests (N-Z) (#114926) 2024-04-05 17:37:00 +02:00
Joost Lekkerkerker
2ef0521d3d
Use is in enum comparison in config flow tests U-Z (#114677)
* Use right enum expression U-Z

* Fix
2024-04-02 23:09:56 +02:00
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller
87165c0d6e
Add empty line after module docstring [tests t-z] (#112712) 2024-03-08 14:44:56 +01:00
Marc Mueller
8b0c9d3d18
Use builtin TimeoutError [t-z] (#109683) 2024-02-05 12:20:36 +01:00
Erik Montnemery
6908497c3d
Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
Erik Montnemery
5b55c7da5f
Remove logic converting empty or falsy YAML to empty dict (#103912)
* Correct logic converting empty YAML to empty dict

* Modify according to github comments

* Add load_yaml_dict helper

* Update check_config script

* Update tests
2023-12-05 18:08:11 +01:00
Erik Montnemery
7539cf25be
Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
Allen Porter
12129e9d21
Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

* Remove timeout behavior and update callers that depend on it today

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
Ville Skyttä
1ce74ba25c
Import util.dt as dt_util in components/[t-z]* (#93763) 2023-05-29 23:00:43 +02:00
epenet
9762b684c2
Adjust entity registry access in tests (3) (#88964) 2023-03-01 16:04:40 +01:00
epenet
ac6bbc2f1c
Add missing mock in webostv config flow tests (#88913) 2023-02-28 12:04:40 -05:00
epenet
aa50096a31
Add type hints to integration tests (part 24) (#88307) 2023-02-17 16:34:53 +01:00
Franck Nijhof
ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
278050a73f
Add type hints to integration tests (t-z) (#87707) 2023-02-08 19:10:53 +01:00
epenet
a79be493e5
Adjust hass_client type hint in integration tests (#86954)
* Adjust hass_client type hint in integration tests

* Adjust hass_client_no_auth

* Fix rebase
2023-02-02 16:29:57 -05:00
Franck Nijhof
fca3382d37
Migrates tests to use MediaPlayerEntityFeature enum (#86779) 2023-01-27 10:56:40 +01:00