示例#1
0
 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()
示例#2
0
    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
示例#3
0
    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