Explain Nest setup (#146217)

This commit is contained in:
Joost Lekkerkerker 2025-06-11 10:31:08 +02:00 committed by GitHub
parent 1462366764
commit e9a71a8d7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 8 deletions

View File

@ -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()

View File

@ -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": {

View File

@ -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})