Add icon translations to Watttime (#112351)

pull/103564/head
Joost Lekkerkerker 2024-03-05 15:03:22 +01:00 committed by GitHub
parent d0a66b3265
commit 4fcc446255
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View File

@ -0,0 +1,12 @@
{
"entity": {
"sensor": {
"marginal_operating_emissions_rate": {
"default": "mdi:blur"
},
"relative_marginal_emissions_intensity": {
"default": "mdi:blur"
}
}
}
}

View File

@ -38,14 +38,12 @@ REALTIME_EMISSIONS_SENSOR_DESCRIPTIONS = (
SensorEntityDescription( SensorEntityDescription(
key=SENSOR_TYPE_REALTIME_EMISSIONS_MOER, key=SENSOR_TYPE_REALTIME_EMISSIONS_MOER,
translation_key="marginal_operating_emissions_rate", translation_key="marginal_operating_emissions_rate",
icon="mdi:blur",
native_unit_of_measurement=f"{UnitOfMass.POUNDS} CO2/MWh", native_unit_of_measurement=f"{UnitOfMass.POUNDS} CO2/MWh",
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
), ),
SensorEntityDescription( SensorEntityDescription(
key=SENSOR_TYPE_REALTIME_EMISSIONS_PERCENT, key=SENSOR_TYPE_REALTIME_EMISSIONS_PERCENT,
translation_key="relative_marginal_emissions_intensity", translation_key="relative_marginal_emissions_intensity",
icon="mdi:blur",
native_unit_of_measurement=PERCENTAGE, native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
), ),