mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
And a test just to see if nothing works if not providing any vars
This commit is contained in:
parent
d4b444823c
commit
0a4e857901
@ -377,6 +377,24 @@ class TestAutomationTime(unittest.TestCase):
|
||||
self.hass.pool.block_till_done()
|
||||
self.assertEqual(1, len(self.calls))
|
||||
|
||||
def test_if_not_working_if_no_values_in_conf_provided(self):
|
||||
self.assertTrue(automation.setup(self.hass, {
|
||||
automation.DOMAIN: {
|
||||
'trigger': {
|
||||
'platform': 'time',
|
||||
},
|
||||
'action': {
|
||||
'service': 'test.automation'
|
||||
}
|
||||
}
|
||||
}))
|
||||
|
||||
fire_time_changed(self.hass, dt_util.utcnow().replace(
|
||||
hour=5, minute=0, second=0))
|
||||
|
||||
self.hass.pool.block_till_done()
|
||||
self.assertEqual(0, len(self.calls))
|
||||
|
||||
@patch('homeassistant.components.automation.time._LOGGER.error')
|
||||
def test_if_not_fires_using_wrong_after(self, mock_error):
|
||||
""" YAML translates time values to total seconds. This should break the
|
||||
|
Loading…
x
Reference in New Issue
Block a user