mirror of
https://github.com/home-assistant/core.git
synced 2025-12-23 12:29:55 +00:00
Fixed value error exception
Fixed unittest
This commit is contained in:
@@ -40,12 +40,12 @@ def register(hass, config, action):
|
||||
:return:
|
||||
"""
|
||||
|
||||
if value is None:
|
||||
try:
|
||||
value = float(value)
|
||||
except ValueError:
|
||||
_LOGGER.warn("Missing value in numeric check")
|
||||
return False
|
||||
|
||||
value = float(value)
|
||||
|
||||
if range_start is not None and range_end is not None:
|
||||
return float(range_start) <= value < float(range_end)
|
||||
elif range_end is not None:
|
||||
|
||||
Reference in New Issue
Block a user