Allow custom_serializer to recognize cv.string and cv.boolean to make config schema more reusable (#41532)
This commit is contained in:
parent
852d1b2e67
commit
d3734aae9d
2 changed files with 27 additions and 0 deletions
|
@ -828,6 +828,12 @@ def custom_serializer(schema: Any) -> Any:
|
|||
if schema is positive_time_period_dict:
|
||||
return {"type": "positive_time_period_dict"}
|
||||
|
||||
if schema is string:
|
||||
return {"type": "string"}
|
||||
|
||||
if schema is boolean:
|
||||
return {"type": "boolean"}
|
||||
|
||||
if isinstance(schema, multi_select):
|
||||
return {"type": "multi_select", "options": schema.options}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue