From 490d8e11366e41b75cc3899cf804ed5c3cdc99b2 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 22 Jan 2022 11:29:16 -1000 Subject: [PATCH] Fix webserver responsiveness where there are a lot of discoveries (#64719) --- homeassistant/data_entry_flow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/data_entry_flow.py b/homeassistant/data_entry_flow.py index e84689ee269..734a568ce4e 100644 --- a/homeassistant/data_entry_flow.py +++ b/homeassistant/data_entry_flow.py @@ -7,12 +7,12 @@ from collections.abc import Iterable, Mapping from dataclasses import dataclass from types import MappingProxyType from typing import Any, TypedDict -import uuid import voluptuous as vol from .core import HomeAssistant, callback from .exceptions import HomeAssistantError +from .util import uuid as uuid_util RESULT_TYPE_FORM = "form" RESULT_TYPE_CREATE_ENTRY = "create_entry" @@ -223,7 +223,7 @@ class FlowManager(abc.ABC): raise UnknownFlow("Flow was not created") flow.hass = self.hass flow.handler = handler - flow.flow_id = uuid.uuid4().hex + flow.flow_id = uuid_util.random_uuid_hex() flow.context = context flow.init_data = data self._async_add_flow_progress(flow)