Device automation config error message improvements (#44656)
Refs #44654, #44655
This commit is contained in:
parent
e2964ca878
commit
da66a4e933
3 changed files with 17 additions and 3 deletions
|
@ -168,7 +168,10 @@ async def async_get_trigger_capabilities(hass, config):
|
|||
)
|
||||
|
||||
if not state or not unit_of_measurement:
|
||||
raise InvalidDeviceAutomationConfig
|
||||
raise InvalidDeviceAutomationConfig(
|
||||
"No state or unit of measurement found for "
|
||||
f"trigger entity {config[CONF_ENTITY_ID]}"
|
||||
)
|
||||
|
||||
return {
|
||||
"extra_fields": vol.Schema(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue