Skip to content
Snippets Groups Projects
Unverified Commit a01e73a5 authored by Joost Lekkerkerker's avatar Joost Lekkerkerker Committed by GitHub
Browse files

Add translation placeholder to Hue (#108848)

parent 7c59b0b4
No related branches found
No related tags found
No related merge requests found
......@@ -86,12 +86,9 @@ class HueButtonEventEntity(HueBaseEntity, EventEntity):
):
event_types.append(event_type.value)
self._attr_event_types = event_types
@property
def name(self) -> str:
"""Return name for the entity."""
# this can be translated too as soon as we support arguments into translations ?
return f"Button {self.resource.metadata.control_id}"
self._attr_translation_placeholders = {
"button_id": self.resource.metadata.control_id
}
@callback
def _handle_event(self, event_type: EventType, resource: Button) -> None:
......
......@@ -76,6 +76,7 @@
"entity": {
"event": {
"button": {
"name": "Button {button_id}",
"state_attributes": {
"event_type": {
"state": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment