From 497b63216a13243615e51d2b958ff67a8ccb0abe Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 27 Feb 2024 10:39:10 +0100 Subject: [PATCH] Add icon translations to Geocaching (#111613) --- .../components/geocaching/icons.json | 21 +++++++++++++++++++ homeassistant/components/geocaching/sensor.py | 5 ----- 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 homeassistant/components/geocaching/icons.json diff --git a/homeassistant/components/geocaching/icons.json b/homeassistant/components/geocaching/icons.json new file mode 100644 index 00000000000..7dce199672b --- /dev/null +++ b/homeassistant/components/geocaching/icons.json @@ -0,0 +1,21 @@ +{ + "entity": { + "sensor": { + "find_count": { + "default": "mdi:notebook-edit-outline" + }, + "hide_count": { + "default": "mdi:eye-off-outline" + }, + "favorite_points": { + "default": "mdi:heart-outline" + }, + "souvenir_count": { + "default": "mdi:license" + }, + "awarded_favorite_points": { + "default": "mdi:heart" + } + } + } +} diff --git a/homeassistant/components/geocaching/sensor.py b/homeassistant/components/geocaching/sensor.py index dd324492d73..91f7addae44 100644 --- a/homeassistant/components/geocaching/sensor.py +++ b/homeassistant/components/geocaching/sensor.py @@ -36,14 +36,12 @@ SENSORS: tuple[GeocachingSensorEntityDescription, ...] = ( GeocachingSensorEntityDescription( key="find_count", translation_key="find_count", - icon="mdi:notebook-edit-outline", native_unit_of_measurement="caches", value_fn=lambda status: status.user.find_count, ), GeocachingSensorEntityDescription( key="hide_count", translation_key="hide_count", - icon="mdi:eye-off-outline", native_unit_of_measurement="caches", entity_registry_visible_default=False, value_fn=lambda status: status.user.hide_count, @@ -51,7 +49,6 @@ SENSORS: tuple[GeocachingSensorEntityDescription, ...] = ( GeocachingSensorEntityDescription( key="favorite_points", translation_key="favorite_points", - icon="mdi:heart-outline", native_unit_of_measurement="points", entity_registry_visible_default=False, value_fn=lambda status: status.user.favorite_points, @@ -59,14 +56,12 @@ SENSORS: tuple[GeocachingSensorEntityDescription, ...] = ( GeocachingSensorEntityDescription( key="souvenir_count", translation_key="souvenir_count", - icon="mdi:license", native_unit_of_measurement="souvenirs", value_fn=lambda status: status.user.souvenir_count, ), GeocachingSensorEntityDescription( key="awarded_favorite_points", translation_key="awarded_favorite_points", - icon="mdi:heart", native_unit_of_measurement="points", entity_registry_visible_default=False, value_fn=lambda status: status.user.awarded_favorite_points,