diff --git a/homeassistant/components/hue/event.py b/homeassistant/components/hue/event.py index da59515e7be4ea09380127e786bde0524d8ed7b8..183d2bfb3ae4a3d36a71fdaec5283ee9f8286e65 100644 --- a/homeassistant/components/hue/event.py +++ b/homeassistant/components/hue/event.py @@ -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: diff --git a/homeassistant/components/hue/strings.json b/homeassistant/components/hue/strings.json index 114f501d7a37ae7034ef62ca3691cf9849b3c121..ab1d0fb58ad183d497f7c974458f80956e2fee20 100644 --- a/homeassistant/components/hue/strings.json +++ b/homeassistant/components/hue/strings.json @@ -76,6 +76,7 @@ "entity": { "event": { "button": { + "name": "Button {button_id}", "state_attributes": { "event_type": { "state": {