1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 04:50:05 +00:00

String formatting and max line length - Part 7 (#84532)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Franck Nijhof
2022-12-27 11:18:56 +01:00
committed by GitHub
parent 3149c52be1
commit d4f69a3652
40 changed files with 249 additions and 110 deletions

View File

@@ -106,9 +106,11 @@ class _TemplateAttribute:
"""Handle a template result event callback."""
if isinstance(result, TemplateError):
_LOGGER.error(
"TemplateError('%s') "
"while processing template '%s' "
"for attribute '%s' in entity '%s'",
(
"TemplateError('%s') "
"while processing template '%s' "
"for attribute '%s' in entity '%s'"
),
result,
self.template,
self._attribute,
@@ -130,10 +132,12 @@ class _TemplateAttribute:
validated = self.validator(result)
except vol.Invalid as ex:
_LOGGER.error(
"Error validating template result '%s' "
"from template '%s' "
"for attribute '%s' in entity %s "
"validation message '%s'",
(
"Error validating template result '%s' "
"from template '%s' "
"for attribute '%s' in entity %s "
"validation message '%s'"
),
result,
self.template,
self._attribute,
@@ -310,7 +314,10 @@ class TemplateEntity(Entity):
if self._self_ref_update_count > len(self._template_attrs):
for update in updates:
_LOGGER.warning(
"Template loop detected while processing event: %s, skipping template render for Template[%s]",
(
"Template loop detected while processing event: %s, skipping"
" template render for Template[%s]"
),
event,
update.template.template,
)