1
mirror of https://github.com/home-assistant/core synced 2024-10-04 07:58:43 +02:00
ha-core/homeassistant/components/google_assistant/config_flow.py
Joakim Plate 992ceb1a09
Google Assistant diagnostics and synchronization (#73574)
* Add config flow import for local google assistant
* Add diagnostic with sync response
* Add button for device sync
2022-06-27 20:24:15 +02:00

20 lines
585 B
Python

"""Config flow for google assistant component."""
from homeassistant import config_entries
from .const import CONF_PROJECT_ID, DOMAIN
class GoogleAssistantHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow."""
VERSION = 1
async def async_step_import(self, user_input):
"""Import a config entry."""
await self.async_set_unique_id(unique_id=user_input[CONF_PROJECT_ID])
self._abort_if_unique_id_configured()
return self.async_create_entry(
title=user_input[CONF_PROJECT_ID], data=user_input
)