1
0
mirror of https://github.com/home-assistant/core.git synced 2025-04-29 19:57:52 +00:00

32 Commits

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

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

This reverts commit ecb3bf79f32a2e25d141ff467e5958826ed9fc3a.

* Update test snapshot

* Add config subentry support to device registry ()

* 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 ()

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry ()

* Clean up registries when removing subentry

* Update tests

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

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform ()

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry ()

* Add reconfigure support to config subentries ()

* 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 ()

* 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
epenet
b11b36b523
Add more util aliases to import conventions () 2025-01-21 15:58:23 +01:00
Erik Montnemery
5888b83f22
Validate device id when adding or updating entity registry entry () 2025-01-07 16:10:51 +00:00
Erik Montnemery
ecb3bf79f3
Revert "Add support for subentries to config entries" ()
Revert "Add support for subentries to config entries ()"

This reverts commit ad15786115673c5b3fe40ea2f5d61b4b896f433e.
2024-12-18 13:51:05 +01:00
Erik Montnemery
ad15786115
Add support for subentries to config entries ()
* 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
Alberto Montes
5d2f8319b1
Update string formatting to use f-string on tests ()
* Update string formatting to use f-string on tests

* Update test_package.py

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

* Update statement given feedback

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-09-19 10:32:38 +02:00
epenet
d961e20b15
Add missing hass type hint in component tests (p) () 2024-08-20 12:52:33 +02:00
epenet
24f83c5890
Use is in FlowResultType enum comparison in tests ()
* Use is in FlowResultType enum comparison in tests

* Adjust auth

* Adjust systemmonitor

* Once more

* Add comment
2024-04-05 10:40:14 +02:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 ()
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller
1722e23df8
Add empty line after module docstring [tests l-p] () 2024-03-08 14:55:15 +01:00
Erik Montnemery
6908497c3d
Add minor version to config entries () 2023-12-12 08:44:35 +01:00
epenet
42d90538e4
Use load_json_object in ps4 () 2023-02-22 13:55:44 +01:00
Franck Nijhof
330e1c6cbb
Clean up unnecessary registry mocks from integration tests () 2023-02-09 10:43:45 +01:00
epenet
3abf7ea18a
Add type hints to integration tests (m-p) () 2023-02-08 07:48:54 -08:00
epenet
59ca7780fa
Add typing to tests with single hass argument () 2023-02-07 15:01:16 +01:00
epenet
41d2ac3943
Cleanup MediaClass and MediaType in tests ()
Cleanup MediaClass/MediaType in tests
2022-09-20 17:55:13 +02:00
Franck Nijhof
7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum () 2022-07-07 19:57:36 +03:00
epenet
4eb46d45ca
Cleanup deprecated async_get_registry in tests () 2022-05-18 13:12:38 +02:00
Joakim Sørensen
85c1614204
Add currency to location data () 2021-07-27 21:05:16 -07:00
Joakim Sørensen
7ff14b47a8
Use whoami for location lookup () 2021-05-22 20:34:48 -07:00
Franck Nijhof
177317a345
Allow passing options in config flow entry creation () 2021-05-05 22:14:01 -07:00
Marc Mueller
8e2b5b36b5
Bump pyupgrade to 2.12.0 () 2021-04-09 09:58:27 -07:00
Franck Nijhof
65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Boris Kaplounovsky
2f6ffe7068
Fix json overwriting if you have >1 PS4 connected () 2020-06-02 17:55:55 -07:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 () 2020-04-30 13:29:50 -07:00
Paulus Schoutsen
9a4a83cb91
Fix py38 tests () 2020-04-24 15:09:45 -07:00
Franck Nijhof
d7e9959442
String formatting improvements for tests (2) () 2020-04-05 00:33:07 +02:00
Bas Nijholt
21816eeed4 Sort imports according to PEP8 for components starting with "P" () 2019-12-09 14:29:39 +01:00
Robert Svensson
a2589f56e1 Add system options to config entries ()
* Add system options to config entries

* For feedback

* Follow most of balloobs comments

* Fix balloobs comments

* Improvements

* Fix second round of Balloobs comments

* Fix third round

* Add system options to mock config entry

* Fix integration tests

* Fix the last failing tests

* Fix disabled string

* Fix failing disabled_by tests

* New tests

* Config entry WS API tests

* Fix comments
2019-08-17 21:34:11 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
ktnrg45
48540fc21e Ps4 reformat media data ()
* Reformat saved media data/ fix load + save helpers

* Add url constant

* Reformat saved media data

* Add tests for media data

* Refactor

* Revert deleted lines

* Set attrs after checking for lock

* Patch load games.

* remove unneeded imports

* fix tests

* Correct condition

* Handle errors with loading games

* Correct condition

* Fix select source

* add test

* Remove unneeded vars

* line break

* cleanup loading json

* remove test

* move check for dict

* Set games to {}
2019-07-20 07:36:45 +02:00
ktnrg45
99c6c60bec PS4 Add tests for init ()
* Add some tests for init

* Remove init

* Add config entry version

* Use const for version

* Remove var
2019-07-15 08:47:47 -07:00