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:
parent
fa2c1dafdf
commit
e1cbd6b4c0
25 changed files with 356 additions and 231 deletions
|
@ -72,7 +72,7 @@ class TestSensorMQTT(unittest.TestCase):
|
|||
self.hass.block_till_done()
|
||||
|
||||
self.assertEqual(('command-topic', 'beer on', 2, False),
|
||||
self.mock_publish.mock_calls[-1][1])
|
||||
self.mock_publish.mock_calls[-2][1])
|
||||
state = self.hass.states.get('switch.test')
|
||||
self.assertEqual(STATE_ON, state.state)
|
||||
|
||||
|
@ -80,7 +80,7 @@ class TestSensorMQTT(unittest.TestCase):
|
|||
self.hass.block_till_done()
|
||||
|
||||
self.assertEqual(('command-topic', 'beer off', 2, False),
|
||||
self.mock_publish.mock_calls[-1][1])
|
||||
self.mock_publish.mock_calls[-2][1])
|
||||
state = self.hass.states.get('switch.test')
|
||||
self.assertEqual(STATE_OFF, state.state)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue