diff --git a/homeassistant/components/jewish_calendar/sensor.py b/homeassistant/components/jewish_calendar/sensor.py index 54a3d1497aa..d0376694a44 100644 --- a/homeassistant/components/jewish_calendar/sensor.py +++ b/homeassistant/components/jewish_calendar/sensor.py @@ -122,8 +122,9 @@ class JewishCalendarSensor(Entity): # Compute the weekly portion based on the upcoming shabbat. return after_tzais_date.upcoming_shabbat.parasha if self._type == "holiday": - self._holiday_attrs["type"] = after_shkia_date.holiday_type.name self._holiday_attrs["id"] = after_shkia_date.holiday_name + self._holiday_attrs["type"] = after_shkia_date.holiday_type.name + self._holiday_attrs["type_id"] = after_shkia_date.holiday_type.value return after_shkia_date.holiday_description if self._type == "omer_count": return after_shkia_date.omer_day diff --git a/tests/components/jewish_calendar/test_sensor.py b/tests/components/jewish_calendar/test_sensor.py index 07e0b7cb192..60ffdea8c70 100644 --- a/tests/components/jewish_calendar/test_sensor.py +++ b/tests/components/jewish_calendar/test_sensor.py @@ -180,8 +180,9 @@ async def test_jewish_calendar_sensor( assert sensor_object.state == str(result) if sensor == "holiday": - assert sensor_object.attributes.get("type") == "YOM_TOV" assert sensor_object.attributes.get("id") == "rosh_hashana_i" + assert sensor_object.attributes.get("type") == "YOM_TOV" + assert sensor_object.attributes.get("type_id") == 1 SHABBAT_PARAMS = [