'Test the sunrise trigger.'

def test_sunrise_trigger(self):

    now = datetime(2015, 9, 13, 23, tzinfo=dt_util.UTC)
    trigger_time = datetime(2015, 9, 16, 14, tzinfo=dt_util.UTC)
    with patch('homeassistant.util.dt.utcnow', return_value=now):
        setup_component(self.hass, automation.DOMAIN, {automation.DOMAIN: {'trigger': {'platform': 'sun', 'event': 'sunrise'}, 'action': {'service': 'test.automation'}}})
    fire_time_changed(self.hass, trigger_time)
    self.hass.block_till_done()
    self.assertEqual(1, len(self.calls))
