Services (small_pr)(fix): Added missing return on data template error (#12184)

* Added return on data template error

* Rebased so not sure why spelling errors returned...
This commit is contained in:
Tod Schmidt 2018-02-05 03:19:56 -05:00 committed by Pascal Vizeli
parent 137933a774
commit f5030d9ebf
2 changed files with 19 additions and 0 deletions

View file

@ -74,6 +74,7 @@ def async_call_from_config(hass, config, blocking=False, variables=None,
config[CONF_SERVICE_DATA_TEMPLATE], variables))
except TemplateError as ex:
_LOGGER.error('Error rendering data template: %s', ex)
return
if CONF_SERVICE_ENTITY_ID in config:
service_data[ATTR_ENTITY_ID] = config[CONF_SERVICE_ENTITY_ID]