From 7aca347db50c8b649b6b54177741d3fe03ecd498 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 5 Mar 2024 14:20:23 +0100 Subject: [PATCH] Add icon translations to Tile (#112310) --- homeassistant/components/tile/device_tracker.py | 4 +--- homeassistant/components/tile/icons.json | 9 +++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 homeassistant/components/tile/icons.json diff --git a/homeassistant/components/tile/device_tracker.py b/homeassistant/components/tile/device_tracker.py index df166d17db5..e4adf808029 100644 --- a/homeassistant/components/tile/device_tracker.py +++ b/homeassistant/components/tile/device_tracker.py @@ -37,8 +37,6 @@ ATTR_RING_STATE = "ring_state" ATTR_TILE_NAME = "tile_name" ATTR_VOIP_STATE = "voip_state" -DEFAULT_ICON = "mdi:view-grid" - async def async_setup_entry( hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback @@ -83,9 +81,9 @@ async def async_setup_scanner( class TileDeviceTracker(CoordinatorEntity[DataUpdateCoordinator[None]], TrackerEntity): """Representation of a network infrastructure device.""" - _attr_icon = DEFAULT_ICON _attr_has_entity_name = True _attr_name = None + _attr_translation_key = "tile" def __init__( self, entry: ConfigEntry, coordinator: DataUpdateCoordinator[None], tile: Tile diff --git a/homeassistant/components/tile/icons.json b/homeassistant/components/tile/icons.json new file mode 100644 index 00000000000..f6f38fe8cef --- /dev/null +++ b/homeassistant/components/tile/icons.json @@ -0,0 +1,9 @@ +{ + "entity": { + "device_tracker": { + "tile": { + "default": "mdi:view-grid" + } + } + } +}