mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-13 07:14:04 +02:00
check for cv.string
This commit is contained in:
parent
cfe565a8b2
commit
295c0fa2c1
1 changed files with 2 additions and 0 deletions
|
|
@ -42,6 +42,8 @@ def _type_to_str(type_: Any) -> str:
|
|||
"""Convert a (voluptuous) type to a string."""
|
||||
if type_ == cv.entity_ids:
|
||||
return "list of `entity_id`s"
|
||||
elif type_ == cv.string:
|
||||
return "str"
|
||||
elif type_ in (bool, int, float, str):
|
||||
return f"`{type_.__name__}`"
|
||||
elif type_ == cv.boolean:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue