* 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
* add persistent notification for reauth config flow
* remove log
* Update homeassistant/config_entries.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/config_entries.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* fix logic for determining when to dismiss notification
* add comment
* improve tests to ensure notifications only get dismissed when all in progress config flows of a given type are complete
* Update homeassistant/config_entries.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* handle context is None when accessing source
* add guard to show_advanced_options
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Chris Talkington <chris@talkingtontech.com>
* Allow async_setup changes to config entry data be taken into account
* Fix tests
* Limit scope try…finally
* Update tests/test_config_entries.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Fix import
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Don't expose flows that aren't initialised.
If a flow init does not return immediately then there is a window where our
behaviour is screwy:
* Can try to configure a flow that isn't ready
* Can show notifications for discoveries that might yet return an abort
This moves the flow discovery events and notifications to after the flow is
initialised and hides flows that don't have a cur_step from async_progress
* Fix tradfri test
* Black.
* Lint fixes
* Add unique ID to config entries
* Unload existing entries with same unique ID if flow with unique ID is
finished
* Remove unused exception
* Fix typing
* silence pylint
* Fix tests
* Add unique ID to Hue
* Address typing comment
* Tweaks to comments
* lint
* Add and improve core and config_entries type hints
* Complete and improve config_entries type hints
* More entity registry type hints
* Complete helpers.event type hints
* Refactor the Somfy auth implementation
* Typing
* Migrate Somfy to OAuth2 flow helper
* Add tests
* Add more tests
* Fix tests
* Fix type error
* More tests
* Remove side effect from constructor
* implementation -> auth_implementation
* Make get_implementation async
* Minor cleanup + Allow picking implementations.
* Add support for extra authorize data
* Type hint additions
* Remove optional from sidebar_icon comment
Co-Authored-By: Franck Nijhof <frenck@frenck.nl>
* Remove optional from sidebar_title comment
Co-Authored-By: Franck Nijhof <frenck@frenck.nl>
* Fix issues after rebase and mypy 0.730
* Register devices into the registry
* Switch to device ID instead of webhook ID
* Rearchitect mobile_app to support config entries
* Kill DATA_REGISTRATIONS by migrating registrations into config entries
* Fix tests
* Improve how we get the config_entry_id
* Remove single_instance_allowed
* Simplify setup_registration
* Move webhook registering functions into __init__.py since they are only ever used once
* Kill get_registration websocket command
* Support description_placeholders in async_abort
* Add link to mobile_app implementing apps in abort dialog
* Store config entry and device registry entry in hass.data instead of looking it up
* Add testing to ensure that the config entry is created at registration
* Fix busted async_abort test
* Remove unnecessary check for entry is None
* Don't treat typing as an "in-between" module for import order
That was a < 3.5 era thing.
* Tighten scope of some pylint unused-import disables
To avoid isort moving a top level one around, undesirably broadening its
scope.
* Fix FlowManager.async_init handler type
It's not a Callable, but typically a key pointing to one in a dict.
* Mark pip_kwargs return type hint as Any-valued dict
install_package takes other than str args too.
* Refactoring data_entry_flow and config_entry_flow
Move SOURCE_* to config_entries
Change data_entry_flow.FlowManager.async_init() source param default
to None
Change this first step_id as source or init if source is None
_BaseFlowManagerView pass in SOURCE_USER as default source
* First step of data entry flow decided by _async_create_flow() now
* Lint
* Change helpers.config_entry_flow.DiscoveryFlowHandler default step
* Change FlowManager.async_init source param to context dict param
* Add initial user foundation to Home Assistant
* Address comments
* Address comments
* Allow non-ascii passwords
* One more utf-8 hmac compare digest
* Add new line