mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Jewish calendar : icon translations (#145329)
* Move icons to icons.json * Fix tests
This commit is contained in:
parent
4737091722
commit
40faa156e2
@ -41,7 +41,6 @@ BINARY_SENSORS: tuple[JewishCalendarBinarySensorEntityDescription, ...] = (
|
|||||||
JewishCalendarBinarySensorEntityDescription(
|
JewishCalendarBinarySensorEntityDescription(
|
||||||
key="issur_melacha_in_effect",
|
key="issur_melacha_in_effect",
|
||||||
translation_key="issur_melacha_in_effect",
|
translation_key="issur_melacha_in_effect",
|
||||||
icon="mdi:power-plug-off",
|
|
||||||
is_on=lambda state, now: bool(state.issur_melacha_in_effect(now)),
|
is_on=lambda state, now: bool(state.issur_melacha_in_effect(now)),
|
||||||
),
|
),
|
||||||
JewishCalendarBinarySensorEntityDescription(
|
JewishCalendarBinarySensorEntityDescription(
|
||||||
|
@ -3,5 +3,37 @@
|
|||||||
"count_omer": {
|
"count_omer": {
|
||||||
"service": "mdi:counter"
|
"service": "mdi:counter"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"binary_sensor": {
|
||||||
|
"issur_melacha_in_effect": { "default": "mdi:power-plug-off" },
|
||||||
|
"erev_shabbat_hag": { "default": "mdi:candle-light" },
|
||||||
|
"motzei_shabbat_hag": { "default": "mdi:fire" }
|
||||||
|
},
|
||||||
|
"sensor": {
|
||||||
|
"hebrew_date": { "default": "mdi:star-david" },
|
||||||
|
"weekly_portion": { "default": "mdi:book-open-variant" },
|
||||||
|
"holiday": { "default": "mdi:calendar-star" },
|
||||||
|
"omer_count": { "default": "mdi:counter" },
|
||||||
|
"daf_yomi": { "default": "mdi:book-open-variant" },
|
||||||
|
"alot_hashachar": { "default": "mdi:weather-sunset-up" },
|
||||||
|
"talit_and_tefillin": { "default": "mdi:calendar-clock" },
|
||||||
|
"netz_hachama": { "default": "mdi:calendar-clock" },
|
||||||
|
"sof_zman_shema_gra": { "default": "mdi:calendar-clock" },
|
||||||
|
"sof_zman_shema_mga": { "default": "mdi:calendar-clock" },
|
||||||
|
"sof_zman_tfilla_gra": { "default": "mdi:calendar-clock" },
|
||||||
|
"sof_zman_tfilla_mga": { "default": "mdi:calendar-clock" },
|
||||||
|
"chatzot_hayom": { "default": "mdi:calendar-clock" },
|
||||||
|
"mincha_gedola": { "default": "mdi:calendar-clock" },
|
||||||
|
"mincha_ketana": { "default": "mdi:calendar-clock" },
|
||||||
|
"plag_hamincha": { "default": "mdi:weather-sunset-down" },
|
||||||
|
"shkia": { "default": "mdi:weather-sunset" },
|
||||||
|
"tset_hakohavim_tsom": { "default": "mdi:weather-night" },
|
||||||
|
"tset_hakohavim_shabbat": { "default": "mdi:weather-night" },
|
||||||
|
"upcoming_shabbat_candle_lighting": { "default": "mdi:candle" },
|
||||||
|
"upcoming_shabbat_havdalah": { "default": "mdi:weather-night" },
|
||||||
|
"upcoming_candle_lighting": { "default": "mdi:candle" },
|
||||||
|
"upcoming_havdalah": { "default": "mdi:weather-night" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,30 +30,25 @@ INFO_SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="date",
|
key="date",
|
||||||
translation_key="hebrew_date",
|
translation_key="hebrew_date",
|
||||||
icon="mdi:star-david",
|
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="weekly_portion",
|
key="weekly_portion",
|
||||||
translation_key="weekly_portion",
|
translation_key="weekly_portion",
|
||||||
icon="mdi:book-open-variant",
|
|
||||||
device_class=SensorDeviceClass.ENUM,
|
device_class=SensorDeviceClass.ENUM,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="holiday",
|
key="holiday",
|
||||||
translation_key="holiday",
|
translation_key="holiday",
|
||||||
icon="mdi:calendar-star",
|
|
||||||
device_class=SensorDeviceClass.ENUM,
|
device_class=SensorDeviceClass.ENUM,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="omer_count",
|
key="omer_count",
|
||||||
translation_key="omer_count",
|
translation_key="omer_count",
|
||||||
icon="mdi:counter",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="daf_yomi",
|
key="daf_yomi",
|
||||||
translation_key="daf_yomi",
|
translation_key="daf_yomi",
|
||||||
icon="mdi:book-open-variant",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -62,106 +57,88 @@ TIME_SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="alot_hashachar",
|
key="alot_hashachar",
|
||||||
translation_key="alot_hashachar",
|
translation_key="alot_hashachar",
|
||||||
icon="mdi:weather-sunset-up",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="talit_and_tefillin",
|
key="talit_and_tefillin",
|
||||||
translation_key="talit_and_tefillin",
|
translation_key="talit_and_tefillin",
|
||||||
icon="mdi:calendar-clock",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="netz_hachama",
|
key="netz_hachama",
|
||||||
translation_key="netz_hachama",
|
translation_key="netz_hachama",
|
||||||
icon="mdi:calendar-clock",
|
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="sof_zman_shema_gra",
|
key="sof_zman_shema_gra",
|
||||||
translation_key="sof_zman_shema_gra",
|
translation_key="sof_zman_shema_gra",
|
||||||
icon="mdi:calendar-clock",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="sof_zman_shema_mga",
|
key="sof_zman_shema_mga",
|
||||||
translation_key="sof_zman_shema_mga",
|
translation_key="sof_zman_shema_mga",
|
||||||
icon="mdi:calendar-clock",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="sof_zman_tfilla_gra",
|
key="sof_zman_tfilla_gra",
|
||||||
translation_key="sof_zman_tfilla_gra",
|
translation_key="sof_zman_tfilla_gra",
|
||||||
icon="mdi:calendar-clock",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="sof_zman_tfilla_mga",
|
key="sof_zman_tfilla_mga",
|
||||||
translation_key="sof_zman_tfilla_mga",
|
translation_key="sof_zman_tfilla_mga",
|
||||||
icon="mdi:calendar-clock",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="chatzot_hayom",
|
key="chatzot_hayom",
|
||||||
translation_key="chatzot_hayom",
|
translation_key="chatzot_hayom",
|
||||||
icon="mdi:calendar-clock",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="mincha_gedola",
|
key="mincha_gedola",
|
||||||
translation_key="mincha_gedola",
|
translation_key="mincha_gedola",
|
||||||
icon="mdi:calendar-clock",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="mincha_ketana",
|
key="mincha_ketana",
|
||||||
translation_key="mincha_ketana",
|
translation_key="mincha_ketana",
|
||||||
icon="mdi:calendar-clock",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="plag_hamincha",
|
key="plag_hamincha",
|
||||||
translation_key="plag_hamincha",
|
translation_key="plag_hamincha",
|
||||||
icon="mdi:weather-sunset-down",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="shkia",
|
key="shkia",
|
||||||
translation_key="shkia",
|
translation_key="shkia",
|
||||||
icon="mdi:weather-sunset",
|
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="tset_hakohavim_tsom",
|
key="tset_hakohavim_tsom",
|
||||||
translation_key="tset_hakohavim_tsom",
|
translation_key="tset_hakohavim_tsom",
|
||||||
icon="mdi:weather-night",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="tset_hakohavim_shabbat",
|
key="tset_hakohavim_shabbat",
|
||||||
translation_key="tset_hakohavim_shabbat",
|
translation_key="tset_hakohavim_shabbat",
|
||||||
icon="mdi:weather-night",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="upcoming_shabbat_candle_lighting",
|
key="upcoming_shabbat_candle_lighting",
|
||||||
translation_key="upcoming_shabbat_candle_lighting",
|
translation_key="upcoming_shabbat_candle_lighting",
|
||||||
icon="mdi:candle",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="upcoming_shabbat_havdalah",
|
key="upcoming_shabbat_havdalah",
|
||||||
translation_key="upcoming_shabbat_havdalah",
|
translation_key="upcoming_shabbat_havdalah",
|
||||||
icon="mdi:weather-night",
|
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="upcoming_candle_lighting",
|
key="upcoming_candle_lighting",
|
||||||
translation_key="upcoming_candle_lighting",
|
translation_key="upcoming_candle_lighting",
|
||||||
icon="mdi:candle",
|
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="upcoming_havdalah",
|
key="upcoming_havdalah",
|
||||||
translation_key="upcoming_havdalah",
|
translation_key="upcoming_havdalah",
|
||||||
icon="mdi:weather-night",
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -59,7 +59,6 @@ TEST_PARAMS = [
|
|||||||
"attr": {
|
"attr": {
|
||||||
"device_class": "enum",
|
"device_class": "enum",
|
||||||
"friendly_name": "Jewish Calendar Holiday",
|
"friendly_name": "Jewish Calendar Holiday",
|
||||||
"icon": "mdi:calendar-star",
|
|
||||||
"id": "rosh_hashana_i",
|
"id": "rosh_hashana_i",
|
||||||
"type": "YOM_TOV",
|
"type": "YOM_TOV",
|
||||||
"options": lambda: HolidayDatabase(False).get_all_names(),
|
"options": lambda: HolidayDatabase(False).get_all_names(),
|
||||||
@ -77,7 +76,6 @@ TEST_PARAMS = [
|
|||||||
"attr": {
|
"attr": {
|
||||||
"device_class": "enum",
|
"device_class": "enum",
|
||||||
"friendly_name": "Jewish Calendar Holiday",
|
"friendly_name": "Jewish Calendar Holiday",
|
||||||
"icon": "mdi:calendar-star",
|
|
||||||
"id": "chanukah, rosh_chodesh",
|
"id": "chanukah, rosh_chodesh",
|
||||||
"type": "MELACHA_PERMITTED_HOLIDAY, ROSH_CHODESH",
|
"type": "MELACHA_PERMITTED_HOLIDAY, ROSH_CHODESH",
|
||||||
"options": lambda: HolidayDatabase(False).get_all_names(),
|
"options": lambda: HolidayDatabase(False).get_all_names(),
|
||||||
@ -95,7 +93,6 @@ TEST_PARAMS = [
|
|||||||
"attr": {
|
"attr": {
|
||||||
"device_class": "enum",
|
"device_class": "enum",
|
||||||
"friendly_name": "Jewish Calendar Weekly Torah portion",
|
"friendly_name": "Jewish Calendar Weekly Torah portion",
|
||||||
"icon": "mdi:book-open-variant",
|
|
||||||
"options": [str(p) for p in Parasha],
|
"options": [str(p) for p in Parasha],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -144,7 +141,6 @@ TEST_PARAMS = [
|
|||||||
"hebrew_year": "5779",
|
"hebrew_year": "5779",
|
||||||
"hebrew_month_name": "מרחשוון",
|
"hebrew_month_name": "מרחשוון",
|
||||||
"hebrew_day": "6",
|
"hebrew_day": "6",
|
||||||
"icon": "mdi:star-david",
|
|
||||||
"friendly_name": "Jewish Calendar Date",
|
"friendly_name": "Jewish Calendar Date",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user