def test_lights_on_when_sun_sets(self):
        """Test lights go on when there is someone home and the sun sets."""
        self.assertTrue(device_sun_light_trigger.setup(
            self.hass, {device_sun_light_trigger.DOMAIN: {}}))

        ensure_sun_risen(self.hass)
        light.turn_off(self.hass)

        self.hass.pool.block_till_done()

        ensure_sun_set(self.hass)
        self.hass.pool.block_till_done()

        self.assertTrue(light.is_on(self.hass))
    def test_lights_on_when_sun_sets(self):
        """Test lights go on when there is someone home and the sun sets."""
        self.assertTrue(device_sun_light_trigger.setup(
            self.hass, {device_sun_light_trigger.DOMAIN: {}}))

        ensure_sun_risen(self.hass)
        light.turn_off(self.hass)

        self.hass.pool.block_till_done()

        ensure_sun_set(self.hass)
        self.hass.pool.block_till_done()

        self.assertTrue(light.is_on(self.hass))