Fix launch library translation keys (#114093)

Fix translation keys
This commit is contained in:
Lars Stegman
2024-03-24 15:12:25 +01:00
committed by GitHub
parent db3eeec78c
commit 3a3fb95454

View File

@@ -68,7 +68,7 @@ SENSOR_DESCRIPTIONS: tuple[LaunchLibrarySensorEntityDescription, ...] = (
LaunchLibrarySensorEntityDescription(
key="launch_probability",
icon="mdi:dice-multiple",
translation_key="next_launch",
translation_key="launch_probability",
native_unit_of_measurement=PERCENTAGE,
value_fn=lambda nl: None if nl.probability == -1 else nl.probability,
attributes_fn=lambda nl: None,
@@ -76,7 +76,7 @@ SENSOR_DESCRIPTIONS: tuple[LaunchLibrarySensorEntityDescription, ...] = (
LaunchLibrarySensorEntityDescription(
key="launch_status",
icon="mdi:rocket-launch",
translation_key="next_launch",
translation_key="launch_status",
value_fn=lambda nl: nl.status.name,
attributes_fn=lambda nl: {"reason": nl.holdreason} if nl.inhold else None,
),