Add icon translations to Tile (#112310)

This commit is contained in:
Joost Lekkerkerker 2024-03-05 14:20:23 +01:00 committed by GitHub
parent a13304be5c
commit 7aca347db5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -0,0 +1,9 @@
{
"entity": {
"device_tracker": {
"tile": {
"default": "mdi:view-grid"
}
}
}
}