mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Allow custom_serializer to recognize cv.string and cv.boolean to make config schema more reusable (#41532)
This commit is contained in:
@@ -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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user