mirror of
https://github.com/esphome/esphome.git
synced 2025-11-15 06:15:47 +00:00
[automations] Update error message (#11640)
This commit is contained in:
@@ -182,7 +182,7 @@ def validate_automation(extra_schema=None, extra_validators=None, single=False):
|
|||||||
value = cv.Schema([extra_validators])(value)
|
value = cv.Schema([extra_validators])(value)
|
||||||
if single:
|
if single:
|
||||||
if len(value) != 1:
|
if len(value) != 1:
|
||||||
raise cv.Invalid("Cannot have more than 1 automation for templates")
|
raise cv.Invalid("This trigger allows only a single automation")
|
||||||
return value[0]
|
return value[0]
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user