From 27873b4457d63064785c35f4d0dd1e85fad347ef Mon Sep 17 00:00:00 2001 From: Raoul Teeuwen Date: Tue, 19 Jun 2018 13:26:52 +0200 Subject: [PATCH] Update condition.py (#15021) * Update condition.py Added code that writes to warning-log what entity causes a problem when 'value cannot be processed as a number', making troubleshooting easier. * Make a one-line warning --- homeassistant/helpers/condition.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/helpers/condition.py b/homeassistant/helpers/condition.py index cb577e8a9c7..921b3bcf06b 100644 --- a/homeassistant/helpers/condition.py +++ b/homeassistant/helpers/condition.py @@ -166,7 +166,8 @@ def async_numeric_state(hass: HomeAssistant, entity, below=None, above=None, try: value = float(value) except ValueError: - _LOGGER.warning("Value cannot be processed as a number: %s", value) + _LOGGER.warning("Value cannot be processed as a number: %s " + "(Offending entity: %s)", entity, value) return False if below is not None and value >= below: