1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00
Commit Graph

200 Commits

Author SHA1 Message Date
J. Nick Koston
725b316ec6
Add HomeKit and DHCP to DISCOVERY_SOURCES in config_entries (#54923) 2021-08-20 17:02:03 +02:00
Ville Skyttä
848c0be58a
Avoid some implicit generic Anys (#54577) 2021-08-16 23:12:06 +02:00
Ville Skyttä
470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes (#52987) 2021-07-19 10:46:09 +02:00
Franck Nijhof
b91b553ce5
Abort existing reauth flow on entry removal (#52407) 2021-07-02 20:56:51 +02:00
Erik Montnemery
1d9d9021de
Do not attempt to unload non loaded config entries (#51356) 2021-06-02 10:00:24 +02:00
Paulus Schoutsen
ee2c950716
Merge system options into pref properties (#51347)
* Make system options future proof

* Update tests

* Add types
2021-06-01 22:34:31 +02:00
Paulus Schoutsen
4821484d2c
Add system option to disable polling (#51299) 2021-05-31 15:36:40 -07:00
Franck Nijhof
a8a13da793
Fix discovery without uid aborts on completing user flow (#51105)
* Fix discovery without uid aborts on completing user flow

* Fix comment
2021-05-26 16:29:52 +02:00
Ville Skyttä
19d25cd901
Change config entry state to an enum (#49654)
* Change config entry state to an enum

* Allow but deprecate EntryState str equality comparison

* Test fixes

* Rename to ConfigEntryState

* Remove str comparability backcompat

* Update new occurrences of strs cropped up during review
2021-05-20 19:19:20 +02:00
Ruslan Sayfutdinov
391b2f8ccd
Add missing return type in Core constructors (#50884) 2021-05-20 18:53:29 +03:00
J. Nick Koston
34c84a6bbb
Reduce boilerplate to abort for matching config entries (#50186)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-11 22:00:12 +02:00
Franck Nijhof
177317a345
Allow passing options in config flow entry creation (#49912) 2021-05-05 22:14:01 -07:00
Franck Nijhof
96f69fb9fb
Finalize clean up connection classes (#49895) 2021-05-04 20:08:51 +02:00
Franck Nijhof
c68b259bd3
Cleanup of unused connection_class logic (#49865)
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-04-29 23:12:58 +02:00
Ruslan Sayfutdinov
183220008d
Rename FlowResultDict to FlowResult (#49847) 2021-04-29 13:40:51 +02:00
J. Nick Koston
51be2f860a
Reduce boilerplate to setup config entry platforms A-C (#49681)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-26 07:46:55 -10:00
Paulus Schoutsen
265fdea83b
Allow config entries to store a reason (#49581) 2021-04-23 09:23:43 +02:00
Ruslan Sayfutdinov
7a9385d857
Explicitly define all methods in ConfigFlow (#49341) 2021-04-17 12:42:31 +02:00
Ruslan Sayfutdinov
80f66f301b
Define data flow result type (#49260)
* Define data flow result type

* Revert explicit definitions

* Fix tests

* Specific mypy ignore
2021-04-15 07:17:07 -10:00
J. Nick Koston
dafc7a072c
Cancel discovery flows that are initializing at shutdown (#49241) 2021-04-15 07:13:42 -10:00
J. Nick Koston
44beff31c2
Cancel config entry retry, platform retry, and polling at the stop event (#49138) 2021-04-13 16:16:26 -10:00
J. Nick Koston
4cd7f9bd8b
Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth (#48962) 2021-04-09 19:41:29 -10:00
J. Nick Koston
40450b9cfd
Detach aiohttp.ClientSession created by config entry setup on unload (#48908) 2021-04-09 10:14:33 -07:00
J. Nick Koston
cfe2df9ebd
Prevent config entry retry from blocking startup (#48660)
- If there are two integrations doing long retries async_block_till_done() will never be done
2021-04-03 17:00:22 -07:00
J. Nick Koston
6023105c6a
Do not load ignored or disabled integrations at startup (#48355)
config_entries.async_setup will skip ignored and disabled integrations
but bootstrap would still load them in memory even though they would
never be setup.
2021-03-29 13:06:44 +02:00
J. Nick Koston
cb1b45d31a
Log the reason a config entry failed to setup (#48449)
If we pass a string to ConfigEntryNotReady or raise it from
another exception we now log the string passed or the
string generated by the original exception.

With #47201 this makes it easy for developers to still show
the reason why setup failed without having to worry about log
spam from additional attempts by rasing ConfigEntryNotReady
from the original exception.
2021-03-29 12:25:40 +02:00
Franck Nijhof
f0e5e616a7
Fix device discovery of OAuth2 config flows (#48326) 2021-03-25 10:35:01 -07:00
J. Nick Koston
f35641ae8e
Make sure include_ignore=False always works with _async_current_entries (#48196)
If the step was anything other than SOURCE_USER,
include_ignore=False would not be honored
2021-03-21 21:57:49 -07:00
J. Nick Koston
3f2ca16ad7
Index config entries by id (#48199) 2021-03-21 21:44:29 -07:00
Marc Mueller
4cb7718192
Update typing 16 (#48087) 2021-03-18 22:58:19 +01:00
Marc Mueller
e55702d635
Update typing 01 (#48013) 2021-03-17 17:34:55 +01:00
Paulus Schoutsen
67effbc8c4
Config flow to allow marking itself as confirm only (#47607) 2021-03-08 10:54:51 -08:00
Erik Montnemery
504e5b77ca
Improve behaviour when disabling or enabling config entries (#47301) 2021-03-03 10:12:37 -08:00
Simone Chemelli
17444e2f2f
Limit log spam by ConfigEntryNotReady (#47201) 2021-03-02 12:50:28 -08:00
Ville Skyttä
dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Erik Montnemery
003fee2a35
Fix race when disabling config entries (#47210)
* Fix race when disabling config entries

* Remove unused constant
2021-03-01 12:38:49 +01:00
Erik Montnemery
5e26bda52d
Add support for disabling config entries (#46779) 2021-02-20 19:21:39 -08:00
J. Nick Koston
c9df42b69a
Add support for pre-filtering events to the event bus (#46371) 2021-02-14 09:42:55 -10:00
Franck Nijhof
bc1daf1802
None optional hass typing in FlowHandler (#46462)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-13 13:21:37 +01:00
Franck Nijhof
9b7c39d20b
Postponed evaluation of annotations in core (#46434)
* Postponed evaluation of annotations in core

* Remove unneeded future
2021-02-12 10:58:20 +01:00
Erik Montnemery
dd150bb797
Allow manual configuration of ignored singleton config entries (#45161)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-02-04 11:08:10 +01:00
jpcornil-git
74a44e03fa
Extend add_update_listener support to bound methods (#44238) 2021-01-26 22:19:10 +01:00
Simone Chemelli
86cd7911de
Clarify ConfigEntryNotReady log (#45425)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Charles Garwood <cgarwood@gmail.com>
2021-01-22 12:13:23 -05:00
J. Nick Koston
da677f7d5a
Add support for discovery via DHCP (#45087)
* Add support for discovery via DHCP

* additional tesla ouis

* merge tests

* dhcp test

* merge requirements test

* dhcp test

* dhcp discovery

* dhcp discovery

* pylint

* pylint

* pylint

* fix

* Add matching tests

* 100% cover

* cleanup

* fix codespell

* Update exception handling

* remove unneeded comment

* fix options handling exception

* fix options handling exception
2021-01-14 09:09:08 +01:00
Paulus Schoutsen
e83ced6737
Add name to ignored entries (#45051)
* Add name to ignored entries

* Fix test
2021-01-12 09:26:20 +01:00
Ville Skyttä
317ed418dd
Use singleton enum for "not set" sentinels (#41990)
* Use singleton enum for "not set" sentinel

https://www.python.org/dev/peps/pep-0484/#support-for-singleton-types-in-unions

* Remove unused variable
2020-12-19 12:46:27 +01:00
nivnoach
906e1ce960
Allow manual configuration of ignored config entries (#43947) 2020-12-07 09:25:04 +01:00
Erik Montnemery
5694e4190c
Extend WS API result when enabling an entity (#42667)
* Extend WS API result when enabling an entity

* Fix tests

* Fix tests

* Move updated registry entry to sub dict

* Address review comments

* Increase test coverage
2020-11-09 19:47:45 +01:00
Raman Gupta
a416a9e046
Allow options flows to be aborted (#41875) 2020-11-09 08:59:42 +01:00
Philip Allgaier
bd1d6f2c0d
Add link to log view in persistent notification (#42060) 2020-10-21 12:09:45 -05:00