Use expected behvaior for above/below (#7857)
This commit is contained in:
1 parent
cf42303afb
commit
beb8c05d91
2 files changed
+54
-8
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user