diff --git a/tests/components/automation/test_time.py b/tests/components/automation/test_time.py index 991ca8dbc5a..dd3f5a6e9fa 100644 --- a/tests/components/automation/test_time.py +++ b/tests/components/automation/test_time.py @@ -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