Bump hdate to 0.11.1 (#130456)
parent
f51662f31b
commit
e82130e6fe
|
@ -44,6 +44,7 @@ class JewishCalendarEntity(Entity):
|
|||
data = config_entry.runtime_data
|
||||
self._location = data.location
|
||||
self._hebrew = data.language == "hebrew"
|
||||
self._language = data.language
|
||||
self._candle_lighting_offset = data.candle_lighting_offset
|
||||
self._havdalah_offset = data.havdalah_offset
|
||||
self._diaspora = data.diaspora
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"documentation": "https://www.home-assistant.io/integrations/jewish_calendar",
|
||||
"iot_class": "calculated",
|
||||
"loggers": ["hdate"],
|
||||
"requirements": ["hdate==0.10.9"],
|
||||
"requirements": ["hdate==0.11.1"],
|
||||
"single_config_entry": true
|
||||
}
|
||||
|
|
|
@ -275,15 +275,18 @@ class JewishCalendarSensor(JewishCalendarEntity, SensorEntity):
|
|||
# Compute the weekly portion based on the upcoming shabbat.
|
||||
return after_tzais_date.upcoming_shabbat.parasha
|
||||
if self.entity_description.key == "holiday":
|
||||
self._attrs = {
|
||||
"id": after_shkia_date.holiday_name,
|
||||
"type": after_shkia_date.holiday_type.name,
|
||||
"type_id": after_shkia_date.holiday_type.value,
|
||||
}
|
||||
self._attr_options = [
|
||||
h.description.hebrew.long if self._hebrew else h.description.english
|
||||
for h in htables.HOLIDAYS
|
||||
]
|
||||
_id = _type = _type_id = ""
|
||||
_holiday_type = after_shkia_date.holiday_type
|
||||
if isinstance(_holiday_type, list):
|
||||
_id = ", ".join(after_shkia_date.holiday_name)
|
||||
_type = ", ".join([_htype.name for _htype in _holiday_type])
|
||||
_type_id = ", ".join([str(_htype.value) for _htype in _holiday_type])
|
||||
else:
|
||||
_id = after_shkia_date.holiday_name
|
||||
_type = _holiday_type.name
|
||||
_type_id = _holiday_type.value
|
||||
self._attrs = {"id": _id, "type": _type, "type_id": _type_id}
|
||||
self._attr_options = htables.get_all_holidays(self._language)
|
||||
|
||||
return after_shkia_date.holiday_description
|
||||
if self.entity_description.key == "omer_count":
|
||||
|
|
|
@ -1099,7 +1099,7 @@ hass-splunk==0.1.1
|
|||
hassil==2.0.2
|
||||
|
||||
# homeassistant.components.jewish_calendar
|
||||
hdate==0.10.9
|
||||
hdate==0.11.1
|
||||
|
||||
# homeassistant.components.heatmiser
|
||||
heatmiserV3==2.0.3
|
||||
|
|
|
@ -934,7 +934,7 @@ hass-nabucasa==0.84.0
|
|||
hassil==2.0.2
|
||||
|
||||
# homeassistant.components.jewish_calendar
|
||||
hdate==0.10.9
|
||||
hdate==0.11.1
|
||||
|
||||
# homeassistant.components.here_travel_time
|
||||
here-routing==1.0.1
|
||||
|
|
|
@ -93,7 +93,26 @@ TEST_PARAMS = [
|
|||
"id": "rosh_hashana_i",
|
||||
"type": "YOM_TOV",
|
||||
"type_id": 1,
|
||||
"options": [h.description.english for h in htables.HOLIDAYS],
|
||||
"options": htables.get_all_holidays("english"),
|
||||
},
|
||||
),
|
||||
(
|
||||
dt(2024, 12, 31),
|
||||
"UTC",
|
||||
31.778,
|
||||
35.235,
|
||||
"english",
|
||||
"holiday",
|
||||
False,
|
||||
"Chanukah, Rosh Chodesh",
|
||||
{
|
||||
"device_class": "enum",
|
||||
"friendly_name": "Jewish Calendar Holiday",
|
||||
"icon": "mdi:calendar-star",
|
||||
"id": "chanukah, rosh_chodesh",
|
||||
"type": "MELACHA_PERMITTED_HOLIDAY, ROSH_CHODESH",
|
||||
"type_id": "4, 10",
|
||||
"options": htables.get_all_holidays("english"),
|
||||
},
|
||||
),
|
||||
(
|
||||
|
@ -180,6 +199,7 @@ TEST_IDS = [
|
|||
"date_output_hebrew",
|
||||
"holiday",
|
||||
"holiday_english",
|
||||
"holiday_multiple",
|
||||
"torah_reading",
|
||||
"first_stars_ny",
|
||||
"first_stars_jerusalem",
|
||||
|
|
Loading…
Reference in New Issue