Disallow automation.trigger without entity_id (#14724)
This commit is contained in:
parent
f6eb9e79d5
commit
fcbc399809
2 changed files with 5 additions and 2 deletions
|
@ -207,6 +207,7 @@ class TestAutomation(unittest.TestCase):
|
|||
"""Test triggers."""
|
||||
assert setup_component(self.hass, automation.DOMAIN, {
|
||||
automation.DOMAIN: {
|
||||
'alias': 'test',
|
||||
'trigger': [
|
||||
{
|
||||
'platform': 'event',
|
||||
|
@ -228,7 +229,9 @@ class TestAutomation(unittest.TestCase):
|
|||
self.hass.block_till_done()
|
||||
assert len(self.calls) == 0
|
||||
|
||||
self.hass.services.call('automation', 'trigger', blocking=True)
|
||||
self.hass.services.call('automation', 'trigger',
|
||||
{'entity_id': 'automation.test'},
|
||||
blocking=True)
|
||||
self.hass.block_till_done()
|
||||
assert len(self.calls) == 1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue