mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix broken automation test
This commit is contained in:
parent
85489010bc
commit
720e5876a7
@ -343,33 +343,26 @@ class TestAutomation(unittest.TestCase):
|
|||||||
|
|
||||||
def test_automation_list_setting(self):
|
def test_automation_list_setting(self):
|
||||||
""" Event is not a valid condition. Will it still work? """
|
""" Event is not a valid condition. Will it still work? """
|
||||||
automation.setup(self.hass, {
|
self.assertTrue(automation.setup(self.hass, {
|
||||||
automation.DOMAIN: [
|
automation.DOMAIN: [{
|
||||||
{
|
'trigger': {
|
||||||
'trigger': [
|
'platform': 'event',
|
||||||
{
|
'event_type': 'test_event',
|
||||||
'platform': 'event',
|
|
||||||
'event_type': 'test_event',
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
|
||||||
'action': {
|
|
||||||
'execute_service': 'test.automation',
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'trigger': [
|
'action': {
|
||||||
{
|
'service': 'test.automation',
|
||||||
'platform': 'event',
|
|
||||||
'event_type': 'test_event_2',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'action': {
|
|
||||||
'execute_service': 'test.automation',
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
}, {
|
||||||
})
|
'trigger': {
|
||||||
|
'platform': 'event',
|
||||||
|
'event_type': 'test_event_2',
|
||||||
|
},
|
||||||
|
'action': {
|
||||||
|
'service': 'test.automation',
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}))
|
||||||
|
|
||||||
self.hass.bus.fire('test_event')
|
self.hass.bus.fire('test_event')
|
||||||
self.hass.pool.block_till_done()
|
self.hass.pool.block_till_done()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user