Use expected behvaior for above/below (#7857)

This commit is contained in:
Adam Mills authored and Paulus Schoutsen committed 2017-06-01 22:43:24 -07:00
1 parent cf42303afb
commit beb8c05d91
2 files changed
+54 -8

No files matched your search

+2 -2
View File
@@ -166,10 +166,10 @@ def async_numeric_state(hass: HomeAssistant, entity, below=None, above=None,
_LOGGER.warning("Value cannot be processed as a number: %s", value)
return False
if below is not None and value > below:
if below is not None and value >= below:
return False
if above is not None and value < above:
if above is not None and value <= above:
return False
return True