Commit Graph

13 Commits (bcaf1dc20b5035564b0d0e2815bff77e094238e6)

Author SHA1 Message Date
Erik Montnemery 3c0be47d3c
Add FlowManager.async_has_matching_flow (#126804)
* Add FlowManager.async_flow_has_matching_flow

* Revert changes from the future

* Apply suggested changes to apple_tv config flow

* Rename methods after discussion

* Update homeassistant/data_entry_flow.py

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

* Move deduplication functions to config_entries, add tests

* Adjust tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-27 10:51:36 +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
Marc Mueller a6068dcdf2
Update import locations in tests (#122216) 2024-07-20 11:16:04 +02:00
Marc Mueller ca55986057
Import Generator from collections.abc (1) (#120914) 2024-07-01 11:51:51 +02:00
epenet 648ef94888
Improve type hints in core helper tests (#120096) 2024-06-21 15:43:27 +02:00
Marc Mueller 19ab3d6daf
Add empty line after module docstring [helpers + other] (#112707) 2024-03-08 10:36:11 -05:00
Erik Montnemery 3d3e9900c3
Add TypeVar default for FlowResult (#112345)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-03-05 22:52:11 +01:00
Erik Montnemery a0e558c457
Add generic classes BaseFlowHandler and BaseFlowManager (#111814)
* Add generic classes BaseFlowHandler and BaseFlowManager

* Migrate zwave_js

* Update tests

* Update tests

* Address review comments
2024-02-29 16:52:39 +01:00
J. Nick Koston c399cab427
Small speed up to checking core state (#107845) 2024-01-18 08:41:32 -10:00
J. Nick Koston 57360a7528
Prevent new discovery flows from being created when stopping (#88743) 2023-02-25 12:02:07 +01:00
epenet 5f25b71df7
Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
J. Nick Koston c0e22be7a8
Fix allowing identical flows to be created before startup (#88213)
The check for identical flows only worked after
the start event. We now check against pending
flows as well

If startup took a while we could end up
with quite the thundering herd
2023-02-15 21:36:00 -05:00
J. Nick Koston b86e19143d
Prevent event loop delay / instability from discovery (#57463) 2021-10-13 08:37:14 -07:00