mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add icon translations to Version (#112343)
This commit is contained in:
parent
23ffcaf187
commit
0b6307fa53
9
homeassistant/components/version/icons.json
Normal file
9
homeassistant/components/version/icons.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"version": {
|
||||||
|
"default": "mdi:package-up"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -32,6 +32,7 @@ async def async_setup_entry(
|
|||||||
entity_description=SensorEntityDescription(
|
entity_description=SensorEntityDescription(
|
||||||
key=str(entry.data[CONF_SOURCE]),
|
key=str(entry.data[CONF_SOURCE]),
|
||||||
name=entity_name,
|
name=entity_name,
|
||||||
|
translation_key="version",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
@ -42,8 +43,6 @@ async def async_setup_entry(
|
|||||||
class VersionSensorEntity(VersionEntity, SensorEntity):
|
class VersionSensorEntity(VersionEntity, SensorEntity):
|
||||||
"""Version sensor entity class."""
|
"""Version sensor entity class."""
|
||||||
|
|
||||||
_attr_icon = "mdi:package-up"
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_value(self) -> StateType:
|
def native_value(self) -> StateType:
|
||||||
"""Return the native value of this sensor."""
|
"""Return the native value of this sensor."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user