mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Add entity translations to Geocaching (#95396)
This commit is contained in:
parent
243abf32c0
commit
e8cb9fba7b
@ -36,14 +36,14 @@ class GeocachingSensorEntityDescription(
|
||||
SENSORS: tuple[GeocachingSensorEntityDescription, ...] = (
|
||||
GeocachingSensorEntityDescription(
|
||||
key="find_count",
|
||||
name="Total finds",
|
||||
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",
|
||||
name="Total hides",
|
||||
translation_key="hide_count",
|
||||
icon="mdi:eye-off-outline",
|
||||
native_unit_of_measurement="caches",
|
||||
entity_registry_visible_default=False,
|
||||
@ -51,7 +51,7 @@ SENSORS: tuple[GeocachingSensorEntityDescription, ...] = (
|
||||
),
|
||||
GeocachingSensorEntityDescription(
|
||||
key="favorite_points",
|
||||
name="Favorite points",
|
||||
translation_key="favorite_points",
|
||||
icon="mdi:heart-outline",
|
||||
native_unit_of_measurement="points",
|
||||
entity_registry_visible_default=False,
|
||||
@ -59,14 +59,14 @@ SENSORS: tuple[GeocachingSensorEntityDescription, ...] = (
|
||||
),
|
||||
GeocachingSensorEntityDescription(
|
||||
key="souvenir_count",
|
||||
name="Total souvenirs",
|
||||
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",
|
||||
name="Awarded favorite points",
|
||||
translation_key="awarded_favorite_points",
|
||||
icon="mdi:heart",
|
||||
native_unit_of_measurement="points",
|
||||
entity_registry_visible_default=False,
|
||||
|
@ -21,5 +21,24 @@
|
||||
"create_entry": {
|
||||
"default": "[%key:common::config_flow::create_entry::authenticated%]"
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"find_count": {
|
||||
"name": "Total finds"
|
||||
},
|
||||
"hide_count": {
|
||||
"name": "Total hides"
|
||||
},
|
||||
"favorite_points": {
|
||||
"name": "Favorite points"
|
||||
},
|
||||
"souvenir_count": {
|
||||
"name": "Total souvenirs"
|
||||
},
|
||||
"awarded_favorite_points": {
|
||||
"name": "Awarded favorite points"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user