Humanize service call config validation errors

pull/2776/head
Paulus Schoutsen 2016-08-09 20:58:08 -07:00
parent 6bb6a6ebe9
commit 6dc49ff123
1 changed files with 3 additions and 1 deletions

View File

@ -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