mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Jewish calendar - Fix Parasha values (#144646)
* Fix Parasha values * Fix test * Update sensor.py
This commit is contained in:
parent
f0c5fbfb8a
commit
b1ffcb4245
@ -275,9 +275,9 @@ class JewishCalendarSensor(JewishCalendarEntity, SensorEntity):
|
|||||||
}
|
}
|
||||||
return after_shkia_date.hdate
|
return after_shkia_date.hdate
|
||||||
if self.entity_description.key == "weekly_portion":
|
if self.entity_description.key == "weekly_portion":
|
||||||
self._attr_options = list(Parasha)
|
self._attr_options = [str(p) for p in Parasha]
|
||||||
# Compute the weekly portion based on the upcoming shabbat.
|
# Compute the weekly portion based on the upcoming shabbat.
|
||||||
return after_tzais_date.upcoming_shabbat.parasha
|
return str(after_tzais_date.upcoming_shabbat.parasha)
|
||||||
if self.entity_description.key == "holiday":
|
if self.entity_description.key == "holiday":
|
||||||
_holidays = after_shkia_date.holidays
|
_holidays = after_shkia_date.holidays
|
||||||
_id = ", ".join(holiday.name for holiday in _holidays)
|
_id = ", ".join(holiday.name for holiday in _holidays)
|
||||||
|
@ -96,7 +96,7 @@ TEST_PARAMS = [
|
|||||||
"device_class": "enum",
|
"device_class": "enum",
|
||||||
"friendly_name": "Jewish Calendar Weekly Torah portion",
|
"friendly_name": "Jewish Calendar Weekly Torah portion",
|
||||||
"icon": "mdi:book-open-variant",
|
"icon": "mdi:book-open-variant",
|
||||||
"options": list(Parasha),
|
"options": [str(p) for p in Parasha],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"he",
|
"he",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user