From 30a8c1739f24aab837e2efbadb6b8c106b20b08c Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 5 Mar 2024 08:43:50 +0100 Subject: [PATCH] Add icon translations to PS4 (#112190) --- homeassistant/components/ps4/icons.json | 12 ++++++++++++ homeassistant/components/ps4/media_player.py | 4 +--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 homeassistant/components/ps4/icons.json diff --git a/homeassistant/components/ps4/icons.json b/homeassistant/components/ps4/icons.json new file mode 100644 index 00000000000..165099070a9 --- /dev/null +++ b/homeassistant/components/ps4/icons.json @@ -0,0 +1,12 @@ +{ + "entity": { + "media_player": { + "media_player": { + "default": "mdi:sony-playstation" + } + } + }, + "services": { + "send_command": "mdi:terminal" + } +} diff --git a/homeassistant/components/ps4/media_player.py b/homeassistant/components/ps4/media_player.py index 42a1021afe4..732d86bef37 100644 --- a/homeassistant/components/ps4/media_player.py +++ b/homeassistant/components/ps4/media_player.py @@ -41,8 +41,6 @@ from .const import ( _LOGGER = logging.getLogger(__name__) -ICON = "mdi:sony-playstation" - DEFAULT_RETRIES = 2 @@ -67,7 +65,6 @@ async def async_setup_entry( class PS4Device(MediaPlayerEntity): """Representation of a PS4.""" - _attr_icon = ICON _attr_supported_features = ( MediaPlayerEntityFeature.TURN_OFF | MediaPlayerEntityFeature.TURN_ON @@ -75,6 +72,7 @@ class PS4Device(MediaPlayerEntity): | MediaPlayerEntityFeature.STOP | MediaPlayerEntityFeature.SELECT_SOURCE ) + _attr_translation_key = "media_player" def __init__( self,