Convert automation to entities with services

This commit is contained in:
Paulus Schoutsen 2016-08-25 23:25:57 -07:00
parent d9ecc4af64
commit 3fa1963345
18 changed files with 365 additions and 61 deletions

View file

@ -45,6 +45,14 @@ class TestAutomationNumericState(unittest.TestCase):
self.hass.pool.block_till_done()
self.assertEqual(1, len(self.calls))
# Set above 12 so the automation will fire again
self.hass.states.set('test.entity', 12)
automation.turn_off(self.hass)
self.hass.pool.block_till_done()
self.hass.states.set('test.entity', 9)
self.hass.pool.block_till_done()
self.assertEqual(1, len(self.calls))
def test_if_fires_on_entity_change_over_to_below(self):
""""Test the firing with changed entity."""
self.hass.states.set('test.entity', 11)