mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Use new custom_serializer (#31871)
This commit is contained in:
parent
7dff5e79d1
commit
91018034b6
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user