MQTT convert to async (#6064)

* Migrate mqtt to async

* address paulus comment / convert it complet async

* adress paulus comment / remove future

* Automation triggers should be async

* Fix MQTT async calls

* Show that event helpers are callbacks

* Fix tests

* Lint
This commit is contained in:
Pascal Vizeli authored and Paulus Schoutsen committed 2017-02-18 14:17:18 -08:00
1 parent fa2c1dafdf
commit e1cbd6b4c0
25 files changed
+356 -231

No files matched your search

+2 -2
View File
@@ -73,7 +73,7 @@ class TestLockMQTT(unittest.TestCase):
self.hass.block_till_done()
self.assertEqual(('command-topic', 'LOCK', 2, False),
self.mock_publish.mock_calls[-1][1])
self.mock_publish.mock_calls[-2][1])
state = self.hass.states.get('lock.test')
self.assertEqual(STATE_LOCKED, state.state)
@@ -81,7 +81,7 @@ class TestLockMQTT(unittest.TestCase):
self.hass.block_till_done()
self.assertEqual(('command-topic', 'UNLOCK', 2, False),
self.mock_publish.mock_calls[-1][1])
self.mock_publish.mock_calls[-2][1])
state = self.hass.states.get('lock.test')
self.assertEqual(STATE_UNLOCKED, state.state)