From 7de94f363256d6ac8a61d38b42a15fd20fcb498f Mon Sep 17 00:00:00 2001 From: Manu <4445816+tr4nt0r@users.noreply.github.com> Date: Thu, 30 Oct 2025 08:40:07 +0100 Subject: [PATCH] Set Xbox logo as icon for media player (#155459) --- homeassistant/components/xbox/icons.json | 5 +++++ homeassistant/components/xbox/media_player.py | 1 + tests/components/xbox/snapshots/test_media_player.ambr | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/xbox/icons.json b/homeassistant/components/xbox/icons.json index 60cd6f9ace5..ed9334c860d 100644 --- a/homeassistant/components/xbox/icons.json +++ b/homeassistant/components/xbox/icons.json @@ -11,6 +11,11 @@ "default": "mdi:account" } }, + "media_player": { + "xbox": { + "default": "mdi:microsoft-xbox" + } + }, "sensor": { "follower": { "default": "mdi:account-arrow-left" diff --git a/homeassistant/components/xbox/media_player.py b/homeassistant/components/xbox/media_player.py index 912047c4c65..3c7c9644aa5 100644 --- a/homeassistant/components/xbox/media_player.py +++ b/homeassistant/components/xbox/media_player.py @@ -70,6 +70,7 @@ class XboxMediaPlayer(XboxConsoleBaseEntity, MediaPlayerEntity): """Representation of an Xbox Media Player.""" _attr_media_image_remotely_accessible = True + _attr_translation_key = "xbox" @property def state(self) -> MediaPlayerState | None: diff --git a/tests/components/xbox/snapshots/test_media_player.ambr b/tests/components/xbox/snapshots/test_media_player.ambr index e68d1df01c1..3802c537ad6 100644 --- a/tests/components/xbox/snapshots/test_media_player.ambr +++ b/tests/components/xbox/snapshots/test_media_player.ambr @@ -30,7 +30,7 @@ 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': , - 'translation_key': None, + 'translation_key': 'xbox', 'unique_id': 'HIJKLMN', 'unit_of_measurement': None, }) @@ -84,7 +84,7 @@ 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': , - 'translation_key': None, + 'translation_key': 'xbox', 'unique_id': 'ABCDEFG', 'unit_of_measurement': None, })