Add icon translations to Aurora (#108410)
parent
5a1d447730
commit
4f4f22ba36
|
@ -19,7 +19,6 @@ async def async_setup_entry(
|
|||
entity = AuroraSensor(
|
||||
coordinator=coordinator,
|
||||
translation_key="visibility_alert",
|
||||
icon="mdi:hazard-lights",
|
||||
)
|
||||
|
||||
async_add_entries([entity])
|
||||
|
|
|
@ -20,7 +20,6 @@ class AuroraEntity(CoordinatorEntity[AuroraDataUpdateCoordinator]):
|
|||
self,
|
||||
coordinator: AuroraDataUpdateCoordinator,
|
||||
translation_key: str,
|
||||
icon: str,
|
||||
) -> None:
|
||||
"""Initialize the Aurora Entity."""
|
||||
|
||||
|
@ -28,7 +27,6 @@ class AuroraEntity(CoordinatorEntity[AuroraDataUpdateCoordinator]):
|
|||
|
||||
self._attr_translation_key = translation_key
|
||||
self._attr_unique_id = f"{coordinator.latitude}_{coordinator.longitude}"
|
||||
self._attr_icon = icon
|
||||
self._attr_device_info = DeviceInfo(
|
||||
entry_type=DeviceEntryType.SERVICE,
|
||||
identifiers={(DOMAIN, self._attr_unique_id)},
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"entity": {
|
||||
"binary_sensor": {
|
||||
"visibility_alert": {
|
||||
"default": "mdi:hazard-lights"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"visibility": {
|
||||
"default": "mdi:gauge"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,7 +20,6 @@ async def async_setup_entry(
|
|||
entity = AuroraSensor(
|
||||
coordinator=coordinator,
|
||||
translation_key="visibility",
|
||||
icon="mdi:gauge",
|
||||
)
|
||||
|
||||
async_add_entries([entity])
|
||||
|
|
Loading…
Reference in New Issue