mirror of
https://github.com/home-assistant/core.git
synced 2025-08-16 19:11:42 +02:00
add translation support
This commit is contained in:
@@ -20,9 +20,8 @@ class LMSStatusEntity(CoordinatorEntity[LMSStatusDataUpdateCoordinator]):
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize status sensor entity."""
|
"""Initialize status sensor entity."""
|
||||||
super().__init__(coordinator, context=description.key)
|
super().__init__(coordinator, context=description.key)
|
||||||
self.coordinator = coordinator
|
|
||||||
self.entity_description = description
|
self.entity_description = description
|
||||||
self._attr_name = description.key
|
self._attr_translation_key = description.key
|
||||||
self._attr_unique_id = f"{coordinator.data[STATUS_QUERY_UUID]}{description.key}"
|
self._attr_unique_id = f"{coordinator.data[STATUS_QUERY_UUID]}{description.key}"
|
||||||
|
|
||||||
self._attr_device_info = DeviceInfo(
|
self._attr_device_info = DeviceInfo(
|
||||||
|
@@ -75,5 +75,15 @@
|
|||||||
"name": "Unsync",
|
"name": "Unsync",
|
||||||
"description": "Removes this player from its sync group."
|
"description": "Removes this player from its sync group."
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"binary_sensor": {
|
||||||
|
"rescan": {
|
||||||
|
"name": "rescan"
|
||||||
|
},
|
||||||
|
"needsrestart": {
|
||||||
|
"name": "needsrestart"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user