def test_track_sunrise(self):
        latitude = 32.87336
        longitude = 117.22743

        # Setup sun component
        self.hass.config.latitude = latitude
        self.hass.config.longitude = longitude
        sun.setup(self.hass, {sun.DOMAIN: {sun.CONF_ELEVATION: 0}})

        # Get next sunrise/sunset
        astral = Astral()
        utc_now = dt_util.utcnow()

        mod = -1
        while True:
            next_rising = (astral.sunrise_utc(utc_now +
                           timedelta(days=mod), latitude, longitude))
            if next_rising > utc_now:
                break
            mod += 1

        # Use decorator
        runs = []
        decor = track_sunrise()
        decor(lambda x: runs.append(1))

        offset_runs = []
        offset = timedelta(minutes=30)
        decor = track_sunrise(offset)
        decor(lambda x: offset_runs.append(1))

        # Run tests
        self._send_time_changed(next_rising - offset)
        self.hass.pool.block_till_done()
        self.assertEqual(0, len(runs))
        self.assertEqual(0, len(offset_runs))

        self._send_time_changed(next_rising)
        self.hass.pool.block_till_done()
        self.assertEqual(1, len(runs))
        self.assertEqual(0, len(offset_runs))

        self._send_time_changed(next_rising + offset)
        self.hass.pool.block_till_done()
        self.assertEqual(2, len(runs))
        self.assertEqual(1, len(offset_runs))
Get/set the <rs:md until="" .../> attribute
dataset/ETHPy150Open home-assistant/home-assistant/tests/helpers/test_event_decorators.py/TestEventDecoratorHelpers.test_track_sunrise--crossover with--dataset/ETHPy150Open resync/resync/resync/resource_container.py/ResourceContainer.md_until