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",