mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Add icon translations to Tile (#112310)
This commit is contained in:
parent
a13304be5c
commit
7aca347db5
@ -37,8 +37,6 @@ ATTR_RING_STATE = "ring_state"
|
|||||||
ATTR_TILE_NAME = "tile_name"
|
ATTR_TILE_NAME = "tile_name"
|
||||||
ATTR_VOIP_STATE = "voip_state"
|
ATTR_VOIP_STATE = "voip_state"
|
||||||
|
|
||||||
DEFAULT_ICON = "mdi:view-grid"
|
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||||
@ -83,9 +81,9 @@ async def async_setup_scanner(
|
|||||||
class TileDeviceTracker(CoordinatorEntity[DataUpdateCoordinator[None]], TrackerEntity):
|
class TileDeviceTracker(CoordinatorEntity[DataUpdateCoordinator[None]], TrackerEntity):
|
||||||
"""Representation of a network infrastructure device."""
|
"""Representation of a network infrastructure device."""
|
||||||
|
|
||||||
_attr_icon = DEFAULT_ICON
|
|
||||||
_attr_has_entity_name = True
|
_attr_has_entity_name = True
|
||||||
_attr_name = None
|
_attr_name = None
|
||||||
|
_attr_translation_key = "tile"
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, entry: ConfigEntry, coordinator: DataUpdateCoordinator[None], tile: Tile
|
self, entry: ConfigEntry, coordinator: DataUpdateCoordinator[None], tile: Tile
|
||||||
|
9
homeassistant/components/tile/icons.json
Normal file
9
homeassistant/components/tile/icons.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"device_tracker": {
|
||||||
|
"tile": {
|
||||||
|
"default": "mdi:view-grid"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user