'Run when the state of the sun has changed.'

@callback
def point_in_time_listener(self, now):

    self.update_sun_position(now)
    self.update_as_of(now)
    self.hass.async_add_job(self.async_update_ha_state())
    async_track_point_in_utc_time(self.hass, self.point_in_time_listener, (self.next_change + timedelta(seconds=1)))
