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
This commit is contained in:
parent
1e7333eeb6
commit
27873b4457
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue