1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-09 19:41:49 +00:00

[automations] Update error message (#11640)

This commit is contained in:
Clyde Stubbs
2025-11-01 14:17:23 +10:00
committed by GitHub
parent 30f2a4395f
commit d9d2d2f6b9

View File

@@ -182,7 +182,7 @@ def validate_automation(extra_schema=None, extra_validators=None, single=False):
value = cv.Schema([extra_validators])(value)
if single:
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