feat: implement UI config flow with single-instance enforcement

This commit is contained in:
Joshua King
2026-09-13 14:39:12 -04:00
parent ec888b6426
commit 30fc3eb1d3
5 changed files with 271 additions and 0 deletions
+2
View File
@@ -19,9 +19,11 @@ async def async_setup(hass: HomeAssistant, config: dict[str, Any]) -> bool:
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up NestQuest from a config entry."""
hass.data.setdefault(DOMAIN, {})
hass.data[DOMAIN][entry.entry_id] = entry
return True
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Unload a config entry."""
hass.data.setdefault(DOMAIN, {}).pop(entry.entry_id, None)
return True