From 91018034b66672ee30dac4c3dae3d8b6085cbee0 Mon Sep 17 00:00:00 2001 From: jjlawren Date: Sat, 15 Feb 2020 17:36:57 -0600 Subject: [PATCH] Use new custom_serializer (#31871) --- homeassistant/components/config/config_entries.py | 5 ++++- homeassistant/helpers/data_entry_flow.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/config/config_entries.py b/homeassistant/components/config/config_entries.py index 22df26cce4e..c69a3ed5739 100644 --- a/homeassistant/components/config/config_entries.py +++ b/homeassistant/components/config/config_entries.py @@ -8,6 +8,7 @@ from homeassistant.auth.permissions.const import CAT_CONFIG_ENTRIES from homeassistant.components import websocket_api from homeassistant.components.http import HomeAssistantView from homeassistant.exceptions import Unauthorized +import homeassistant.helpers.config_validation as cv from homeassistant.helpers.data_entry_flow import ( FlowManagerIndexView, FlowManagerResourceView, @@ -45,7 +46,9 @@ def _prepare_json(result): if schema is None: data["data_schema"] = [] else: - data["data_schema"] = voluptuous_serialize.convert(schema) + data["data_schema"] = voluptuous_serialize.convert( + schema, custom_serializer=cv.custom_serializer + ) return data diff --git a/homeassistant/helpers/data_entry_flow.py b/homeassistant/helpers/data_entry_flow.py index ac5fb608675..05f49cd9f53 100644 --- a/homeassistant/helpers/data_entry_flow.py +++ b/homeassistant/helpers/data_entry_flow.py @@ -5,6 +5,7 @@ import voluptuous as vol from homeassistant import config_entries, data_entry_flow from homeassistant.components.http import HomeAssistantView from homeassistant.components.http.data_validator import RequestDataValidator +import homeassistant.helpers.config_validation as cv # mypy: allow-untyped-calls, allow-untyped-defs @@ -36,7 +37,9 @@ class _BaseFlowManagerView(HomeAssistantView): if schema is None: data["data_schema"] = [] else: - data["data_schema"] = voluptuous_serialize.convert(schema) + data["data_schema"] = voluptuous_serialize.convert( + schema, custom_serializer=cv.custom_serializer + ) return data