Commit Graph
41 Commits
Author SHA1 Message Date
Erik MontnemeryandGitHub ecb3bf79f3 Revert "Add support for subentries to config entries" (#133470)
Revert "Add support for subentries to config entries (#117355)"

This reverts commit ad15786115.
2024-12-18 13:51:05 +01:00
Erik MontnemeryandGitHub 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
JulianandGitHub 72f1c358d9 Fix translation string in guardian (#128535) 2024-10-16 22:09:15 +02:00
epenetandGitHub 0bc572787a Add check for valid error code in translation checks in flows (#128445) 2024-10-16 19:03:24 +02:00
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
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
Robert ReschandGitHub ad50136dbd Add created_at/modified_at to config entries (#122456) 2024-07-29 22:08:46 +02:00
epenetandGitHub 3c69301365 Improve type hints in guardian tests (#121175) 2024-07-04 04:53:49 -05:00
Marc MuellerandGitHub 921430d497 Import Generator from collections.abc (3) (#120916) 2024-07-01 12:09:11 +02:00
Marc MuellerandGitHub 33ed4fd862 Import Generator from typing_extensions (3) (#118990) 2024-06-06 17:28:59 +02:00
Joost LekkerkerkerandGitHub b9281327c4 Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +02:00
Joost LekkerkerkerandGitHub 906d3198e3 Use is in enum comparison in config flow tests F-J (#114670)
* Use right enum expression F-J

* Fix
2024-04-02 23:01:37 +02:00
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
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 MuellerandGitHub c88b337600 Add empty line after module docstring [tests f-k] (#112709) 2024-03-08 14:50:04 +01:00
J. Nick KostonandGitHub efbfec0ece Fix formatting of mac addresses from dhcp discovery mocking in guardian (#110575)
dhcp returns addresses in lowercase without :
2024-02-14 20:54:16 +01:00
Erik MontnemeryandGitHub 6908497c3d Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
706add4a57 Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
J. Nick KostonandGitHub 0eca433004 Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567) 2023-09-19 18:58:46 +02:00
epenetandGitHub f8462fd5b7 Add missing mock in guardian config flow tests (#89451) 2023-03-09 22:57:16 +01:00
epenetandGitHub 89e4ee5320 Add type hints to integration tests (part 8) (#87982) 2023-02-13 11:13:48 +01:00
epenetandGitHub 7a4d15a657 Add type hints to integration tests (f-g) (#87700) 2023-02-08 13:33:52 +01:00
epenetandGitHub aa00114c2f Add return type to async tests without arguments (#87612) 2023-02-07 10:26:56 +01:00
1cf801afbc Remove unnecessary session scoping to several test fixtures (#80500)
Co-authored-by: Joakim Plate <elupus@ecce.se>
2022-10-18 18:06:23 +02:00
Aaron BachandGitHub 0f002e7044 Use entry.as_dict() in Guardian diagnostics (#80112) 2022-10-11 19:12:17 +03:00
Aaron BachandGitHub b0261dd2eb Modify Guardian to store a single dataclass in hass.data (#75454)
* Modify Guardian to store a single dataclass in `hass.data`

* Clarity is better

* Allow entry unload to cancel task
2022-07-21 20:32:42 -06:00
Franck NijhofandGitHub 7cd68381f1 Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
epenetandGitHub 053c4428a9 Prettify json (component test fixtures) (#68892) 2022-03-30 11:37:17 +02:00
Joshua RoysandGitHub 9134e5c844 Get discovered zeroconf IPv6 addresses (#65462) 2022-02-11 16:46:17 -06:00
J. Nick KostonandGitHub c7eb676449 Fix guardian being rediscovered via dhcp (#65332) 2022-01-31 15:24:55 -08:00
Aaron BachandGitHub 6bbe38578c Add diagnostics to Elexa Guardian (#64599) 2022-01-21 00:12:36 -07:00
Aaron BachandGitHub aef8d9ee4d Clean up Guardian config flow tests (#64598)
* Clean up Guardian config flow tests

* Docstring
2022-01-20 20:32:07 -07:00
01fea8bbdd Use DhcpServiceInfo in guardian tests (#59970)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-19 12:18:32 +01:00
0b43cff377 Use ZeroconfServiceInfo in guardian (#59741)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-15 23:13:17 +01:00
J. Nick KostonandGitHub b36c840909 Add dhcp support to guardian (#50378) 2021-05-10 21:26:15 -05:00
Franck NijhofandGitHub 65cf2fcb6f Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Davey ChuandGitHub aba3cdc7b3 Use references in guardian strings.json (#40987) 2020-10-01 19:16:15 -06:00
Franck NijhofandGitHub 1c2ebdf307 Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Paulus SchoutsenandGitHub 0c771f1c42 Replace asynctest with tests.async_mock (#37428) 2020-07-03 11:29:35 -07:00
Aaron BachandGitHub b0df223f5a Bump aioguardian (#37188)
* Bump aioguardian

* Fix tests
2020-06-27 23:16:42 -06:00
Aaron BachandGitHub 7571fdc957 Allow Guardian config flow to be ignored (#36207)
* Allow Guardian config flow to be ignored

* Tests
2020-05-27 16:45:28 -06:00
Aaron BachandGitHub 369745c4cf Add support for Elexa Guardian water valve controllers (#34627)
* Add support for Elexa Guardian water valve controllers

* Zeroconf + cleanup

* Sensors and services

* API registration

* Service bug fixes

* Fix bug in cleanup

* Tests and coverage

* Fix incorrect service description

* Bump aioguardian

* Bump aioguardian to 0.2.2

* Bump aioguardian to 0.2.3

* Proper entity inheritance

* Give device a proper name

* Code review
2020-05-26 08:47:25 -05:00