Add entity translations to Watttime (#99151)

This commit is contained in:
Joost Lekkerkerker 2023-08-27 23:54:49 +02:00 committed by GitHub
parent 16041e5127
commit c9905fda6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -36,14 +36,14 @@ SENSOR_TYPE_REALTIME_EMISSIONS_PERCENT = "percent"
REALTIME_EMISSIONS_SENSOR_DESCRIPTIONS = ( REALTIME_EMISSIONS_SENSOR_DESCRIPTIONS = (
SensorEntityDescription( SensorEntityDescription(
key=SENSOR_TYPE_REALTIME_EMISSIONS_MOER, key=SENSOR_TYPE_REALTIME_EMISSIONS_MOER,
name="Marginal operating emissions rate", translation_key="marginal_operating_emissions_rate",
icon="mdi:blur", 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,
name="Relative marginal emissions intensity", translation_key="relative_marginal_emissions_intensity",
icon="mdi:blur", icon="mdi:blur",
native_unit_of_measurement=PERCENTAGE, native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,

View file

@ -48,5 +48,15 @@
} }
} }
} }
},
"entity": {
"sensor": {
"marginal_operating_emissions_rate": {
"name": "Marginal operating emissions rate"
},
"relative_marginal_emissions_intensity": {
"name": "Relative marginal emissions intensity"
}
}
} }
} }