mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Bump hdate to 0.11.1 (#130456)
This commit is contained in:
parent
f51662f31b
commit
e82130e6fe
@ -44,6 +44,7 @@ class JewishCalendarEntity(Entity):
|
|||||||
data = config_entry.runtime_data
|
data = config_entry.runtime_data
|
||||||
self._location = data.location
|
self._location = data.location
|
||||||
self._hebrew = data.language == "hebrew"
|
self._hebrew = data.language == "hebrew"
|
||||||
|
self._language = data.language
|
||||||
self._candle_lighting_offset = data.candle_lighting_offset
|
self._candle_lighting_offset = data.candle_lighting_offset
|
||||||
self._havdalah_offset = data.havdalah_offset
|
self._havdalah_offset = data.havdalah_offset
|
||||||
self._diaspora = data.diaspora
|
self._diaspora = data.diaspora
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/jewish_calendar",
|
"documentation": "https://www.home-assistant.io/integrations/jewish_calendar",
|
||||||
"iot_class": "calculated",
|
"iot_class": "calculated",
|
||||||
"loggers": ["hdate"],
|
"loggers": ["hdate"],
|
||||||
"requirements": ["hdate==0.10.9"],
|
"requirements": ["hdate==0.11.1"],
|
||||||
"single_config_entry": true
|
"single_config_entry": true
|
||||||
}
|
}
|
||||||
|
@ -275,15 +275,18 @@ class JewishCalendarSensor(JewishCalendarEntity, SensorEntity):
|
|||||||
# 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 after_tzais_date.upcoming_shabbat.parasha
|
||||||
if self.entity_description.key == "holiday":
|
if self.entity_description.key == "holiday":
|
||||||
self._attrs = {
|
_id = _type = _type_id = ""
|
||||||
"id": after_shkia_date.holiday_name,
|
_holiday_type = after_shkia_date.holiday_type
|
||||||
"type": after_shkia_date.holiday_type.name,
|
if isinstance(_holiday_type, list):
|
||||||
"type_id": after_shkia_date.holiday_type.value,
|
_id = ", ".join(after_shkia_date.holiday_name)
|
||||||
}
|
_type = ", ".join([_htype.name for _htype in _holiday_type])
|
||||||
self._attr_options = [
|
_type_id = ", ".join([str(_htype.value) for _htype in _holiday_type])
|
||||||
h.description.hebrew.long if self._hebrew else h.description.english
|
else:
|
||||||
for h in htables.HOLIDAYS
|
_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
|
return after_shkia_date.holiday_description
|
||||||
if self.entity_description.key == "omer_count":
|
if self.entity_description.key == "omer_count":
|
||||||
|
@ -1099,7 +1099,7 @@ hass-splunk==0.1.1
|
|||||||
hassil==2.0.2
|
hassil==2.0.2
|
||||||
|
|
||||||
# homeassistant.components.jewish_calendar
|
# homeassistant.components.jewish_calendar
|
||||||
hdate==0.10.9
|
hdate==0.11.1
|
||||||
|
|
||||||
# homeassistant.components.heatmiser
|
# homeassistant.components.heatmiser
|
||||||
heatmiserV3==2.0.3
|
heatmiserV3==2.0.3
|
||||||
|
@ -934,7 +934,7 @@ hass-nabucasa==0.84.0
|
|||||||
hassil==2.0.2
|
hassil==2.0.2
|
||||||
|
|
||||||
# homeassistant.components.jewish_calendar
|
# homeassistant.components.jewish_calendar
|
||||||
hdate==0.10.9
|
hdate==0.11.1
|
||||||
|
|
||||||
# homeassistant.components.here_travel_time
|
# homeassistant.components.here_travel_time
|
||||||
here-routing==1.0.1
|
here-routing==1.0.1
|
||||||
|
@ -93,7 +93,26 @@ TEST_PARAMS = [
|
|||||||
"id": "rosh_hashana_i",
|
"id": "rosh_hashana_i",
|
||||||
"type": "YOM_TOV",
|
"type": "YOM_TOV",
|
||||||
"type_id": 1,
|
"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",
|
"date_output_hebrew",
|
||||||
"holiday",
|
"holiday",
|
||||||
"holiday_english",
|
"holiday_english",
|
||||||
|
"holiday_multiple",
|
||||||
"torah_reading",
|
"torah_reading",
|
||||||
"first_stars_ny",
|
"first_stars_ny",
|
||||||
"first_stars_jerusalem",
|
"first_stars_jerusalem",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user