mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Explain Nest setup (#146217)
This commit is contained in:
parent
1462366764
commit
e9a71a8d7f
@ -31,7 +31,6 @@ from homeassistant.helpers.selector import (
|
||||
SelectSelectorConfig,
|
||||
SelectSelectorMode,
|
||||
)
|
||||
from homeassistant.helpers.service_info.dhcp import DhcpServiceInfo
|
||||
from homeassistant.util import get_random_string
|
||||
|
||||
from . import api
|
||||
@ -441,10 +440,3 @@ class NestFlowHandler(
|
||||
if self._structure_config_title:
|
||||
title = self._structure_config_title
|
||||
return self.async_create_entry(title=title, data=self._data)
|
||||
|
||||
async def async_step_dhcp(
|
||||
self, discovery_info: DhcpServiceInfo
|
||||
) -> ConfigFlowResult:
|
||||
"""Handle a flow initialized by discovery."""
|
||||
await self._async_handle_discovery_without_unique_id()
|
||||
return await self.async_step_user()
|
||||
|
@ -47,6 +47,9 @@
|
||||
"reauth_confirm": {
|
||||
"title": "[%key:common::config_flow::title::reauth%]",
|
||||
"description": "The Nest integration needs to re-authenticate your account"
|
||||
},
|
||||
"oauth_discovery": {
|
||||
"description": "Home Assistant has found a Google Nest device on your network. Be aware that the set up of Google Nest is more complicated than most other integrations and requires setting up a Nest Device Access project which **requires paying Google a US $5 fee**. Press **Submit** to continue setting up Google Nest."
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
|
@ -995,6 +995,10 @@ async def test_dhcp_discovery(
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "oauth_discovery"
|
||||
|
||||
result = await oauth.async_configure(result, {})
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "create_cloud_project"
|
||||
|
||||
result = await oauth.async_configure(result, {})
|
||||
@ -1033,6 +1037,10 @@ async def test_dhcp_discovery_with_creds(
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
assert result.get("type") is FlowResultType.FORM
|
||||
assert result.get("step_id") == "oauth_discovery"
|
||||
|
||||
result = await oauth.async_configure(result, {})
|
||||
assert result.get("type") is FlowResultType.FORM
|
||||
assert result.get("step_id") == "cloud_project"
|
||||
|
||||
result = await oauth.async_configure(result, {"cloud_project_id": CLOUD_PROJECT_ID})
|
||||
|
Loading…
x
Reference in New Issue
Block a user