def get_new_prayer_times(self): """Fetch prayer times for today.""" calc = PrayerTimesCalculator( latitude=self.hass.config.latitude, longitude=self.hass.config.longitude, calculation_method=self.calc_method, date=str(dt_util.now().date()), ) return calc.fetch_prayer_times()
def get_new_prayer_times(self): """Fetch prayer times for today.""" from prayer_times_calculator import PrayerTimesCalculator today = datetime.today().strftime('%Y-%m-%d') calc = PrayerTimesCalculator(latitude=self.latitude, longitude=self.longitude, calculation_method=self.calc_method, date=str(today)) self.prayer_times_info = calc.fetch_prayer_times() return self.prayer_times_info