Allow other icon prefixes than mdi: (#19872)
This commit is contained in:
parent
c29bffc8d8
commit
f73bda1218
2 changed files with 4 additions and 3 deletions
|
@ -200,10 +200,10 @@ def icon(value):
|
|||
"""Validate icon."""
|
||||
value = str(value)
|
||||
|
||||
if value.startswith('mdi:'):
|
||||
if ':' in value:
|
||||
return value
|
||||
|
||||
raise vol.Invalid('Icons should start with prefix "mdi:"')
|
||||
raise vol.Invalid('Icons should be specifed on the form "prefix:name"')
|
||||
|
||||
|
||||
time_period_dict = vol.All(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue