From b1ffcb4245651fbf0d998ea7de52953ea3e4f15c Mon Sep 17 00:00:00 2001 From: Tsvi Mostovicz Date: Wed, 14 May 2025 07:08:47 +0300 Subject: [PATCH] Jewish calendar - Fix Parasha values (#144646) * Fix Parasha values * Fix test * Update sensor.py --- homeassistant/components/jewish_calendar/sensor.py | 4 ++-- tests/components/jewish_calendar/test_sensor.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/jewish_calendar/sensor.py b/homeassistant/components/jewish_calendar/sensor.py index deaae64547a..063818aedf3 100644 --- a/homeassistant/components/jewish_calendar/sensor.py +++ b/homeassistant/components/jewish_calendar/sensor.py @@ -275,9 +275,9 @@ class JewishCalendarSensor(JewishCalendarEntity, SensorEntity): } return after_shkia_date.hdate 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. - return after_tzais_date.upcoming_shabbat.parasha + return str(after_tzais_date.upcoming_shabbat.parasha) if self.entity_description.key == "holiday": _holidays = after_shkia_date.holidays _id = ", ".join(holiday.name for holiday in _holidays) diff --git a/tests/components/jewish_calendar/test_sensor.py b/tests/components/jewish_calendar/test_sensor.py index b33d8f3e84b..9364fcda40c 100644 --- a/tests/components/jewish_calendar/test_sensor.py +++ b/tests/components/jewish_calendar/test_sensor.py @@ -96,7 +96,7 @@ TEST_PARAMS = [ "device_class": "enum", "friendly_name": "Jewish Calendar Weekly Torah portion", "icon": "mdi:book-open-variant", - "options": list(Parasha), + "options": [str(p) for p in Parasha], }, }, "he",