* Configure nest pubsub subscriber automatically
Update the config flow to configure the nest pubsub subscriber automatically.
After completing the authentication step, the user is now asked for the google
cloud console ID, which is needed to create a subscription.
Home Assistant manages the lifecycle of a subscription only when it is created
by the ConfigFlow. Otherwise (if specified in configuration.yaml) it treats
it similarly as before.
These are the considerations or failure modes taken into account:
- Subscription is created with reasonable default values as previously recommended (e.g. retion only keeps 5-15 minutes of backlog messages)
- Subscriptions are created with a naming scheme that makes it clear they came from home assistant, and with a random
string
- Subscriptions are cleaned up when the ConfigEntry is removed. If removal fails, a subscription that is orphaned will
be deleted after 30 days
- If the subscription gets into a bad state or deleted, the user can go through the re-auth flow to re-create it.
- Users can still specifcy a CONF_SUBSCRIBER_ID in the configuration.yaml, and
skip automatic subscriber creation
* Remove unnecessary nest config flow diffs and merge in upstream changes
* Incorporate review feedback into nest subscription config flow
* Update text wording in nest config flow
* Add support for Installed Auth authentication flows.
Add support for additional credential types to make configuration simpler for
end users. The existing Web App auth flow requires users to configure
redirect urls with Google that has a very high security bar: requires ssl,
and a publicly resolvable dns name.
The new Installed App flow requires the user to copy/paste an access code
and is the same flow used by the `google` calendar integration. This also
allows us to let users create one authentication credential to use with
multiple google integrations.
* Remove hard migration for nest config entries, using soft migration
* Add comment explaining soft migration
* Revet changes to common.py made obsolete by removing migration
* Reduce unnecessary diffs in nest common.py
* Update config entries using library method
* Run `python3 -m script.translations develop`
* Revert nest auth domain
* Remove compat function which is no longer needed
* Remove stale nest comment
* Adjust typing for python3.8
* Address PR feedback for nest auth revamp
* Add additional types for config flow
Fixing style errors introduced by partial typing in pr #53214
* Address typing style errors
Make all functions fully typed, follow up to pr #53214
* 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