mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Humanize service call config validation errors
This commit is contained in:
parent
6bb6a6ebe9
commit
6dc49ff123
@ -19,6 +19,7 @@ from types import MappingProxyType
|
||||
from typing import Optional, Any, Callable, List # NOQA
|
||||
|
||||
import voluptuous as vol
|
||||
from voluptuous.humanize import humanize_error
|
||||
|
||||
from homeassistant.const import (
|
||||
ATTR_DOMAIN, ATTR_FRIENDLY_NAME, ATTR_NOW, ATTR_SERVICE,
|
||||
@ -571,7 +572,8 @@ class Service(object):
|
||||
self.func(call)
|
||||
except vol.MultipleInvalid as ex:
|
||||
_LOGGER.error('Invalid service data for %s.%s: %s',
|
||||
call.domain, call.service, ex)
|
||||
call.domain, call.service,
|
||||
humanize_error(call.data, ex))
|
||||
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
|
Loading…
x
Reference in New Issue
Block a user