Add icon translations to amberelectric (#111321)
parent
a706d5e282
commit
dbc4d90435
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"general": {
|
||||
"default": "mdi:transmission-tower"
|
||||
},
|
||||
"controlled_load": {
|
||||
"default": "mdi:clock-outline"
|
||||
},
|
||||
"feed_in": {
|
||||
"default": "mdi:solar-power"
|
||||
},
|
||||
"renewables": {
|
||||
"default": "mdi:solar-power"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -27,12 +27,6 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
|||
from .const import ATTRIBUTION, DOMAIN
|
||||
from .coordinator import AmberUpdateCoordinator, normalize_descriptor
|
||||
|
||||
ICONS = {
|
||||
"general": "mdi:transmission-tower",
|
||||
"controlled_load": "mdi:clock-outline",
|
||||
"feed_in": "mdi:solar-power",
|
||||
}
|
||||
|
||||
UNIT = f"{CURRENCY_DOLLAR}/{UnitOfEnergy.KILO_WATT_HOUR}"
|
||||
|
||||
|
||||
|
@ -219,7 +213,7 @@ async def async_setup_entry(
|
|||
name=f"{entry.title} - {friendly_channel_type(channel_type)} Price",
|
||||
native_unit_of_measurement=UNIT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
icon=ICONS[channel_type],
|
||||
translation_key=channel_type,
|
||||
)
|
||||
entities.append(AmberPriceSensor(coordinator, description, channel_type))
|
||||
|
||||
|
@ -230,7 +224,7 @@ async def async_setup_entry(
|
|||
f"{entry.title} - {friendly_channel_type(channel_type)} Price"
|
||||
" Descriptor"
|
||||
),
|
||||
icon=ICONS[channel_type],
|
||||
translation_key=channel_type,
|
||||
)
|
||||
entities.append(
|
||||
AmberPriceDescriptorSensor(coordinator, description, channel_type)
|
||||
|
@ -242,7 +236,7 @@ async def async_setup_entry(
|
|||
name=f"{entry.title} - {friendly_channel_type(channel_type)} Forecast",
|
||||
native_unit_of_measurement=UNIT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
icon=ICONS[channel_type],
|
||||
translation_key=channel_type,
|
||||
)
|
||||
entities.append(AmberForecastSensor(coordinator, description, channel_type))
|
||||
|
||||
|
@ -251,7 +245,7 @@ async def async_setup_entry(
|
|||
name=f"{entry.title} - Renewables",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
icon="mdi:solar-power",
|
||||
translation_key="renewables",
|
||||
)
|
||||
entities.append(AmberGridSensor(coordinator, renewables_description))
|
||||
|
||||
|
|
Loading…
Reference in New Issue