1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-26 10:15:33 +01:00

Fix doctring newline and handle ha.state string-being

This commit is contained in:
nielstron
2018-04-28 18:09:37 +02:00
parent 07d139b3a8
commit bb98331ba4
2 changed files with 1 additions and 2 deletions
@@ -364,7 +364,6 @@ class RangeFilter(Filter):
def _filter_state(self, new_state):
"""Implement the range filter."""
if new_state.state > self._upper_bound:
self._stats_internal['erasures_up'] += 1
+1 -1
View File
@@ -141,7 +141,7 @@ class TestFilterSensor(unittest.TestCase):
lower_bound=lower,
upper_bound=upper)
for unf_state in self.values:
prev = unf_state.state
prev = float(unf_state.state)
filtered = filt.filter_state(unf_state)
if prev < lower:
self.assertEqual(lower, filtered.state)