mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Migrate WattTime to new entity naming style (#74916)
This commit is contained in:
parent
07444dba2a
commit
4a38be2924
@ -35,14 +35,14 @@ SENSOR_TYPE_REALTIME_EMISSIONS_PERCENT = "percent"
|
||||
REALTIME_EMISSIONS_SENSOR_DESCRIPTIONS = (
|
||||
SensorEntityDescription(
|
||||
key=SENSOR_TYPE_REALTIME_EMISSIONS_MOER,
|
||||
name="Marginal Operating Emissions Rate",
|
||||
name="Marginal operating emissions rate",
|
||||
icon="mdi:blur",
|
||||
native_unit_of_measurement=f"{MASS_POUNDS} CO2/MWh",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=SENSOR_TYPE_REALTIME_EMISSIONS_PERCENT,
|
||||
name="Relative Marginal Emissions Intensity",
|
||||
name="Relative marginal emissions intensity",
|
||||
icon="mdi:blur",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -67,6 +67,8 @@ async def async_setup_entry(
|
||||
class RealtimeEmissionsSensor(CoordinatorEntity, SensorEntity):
|
||||
"""Define a realtime emissions sensor."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
coordinator: DataUpdateCoordinator,
|
||||
|
Loading…
x
Reference in New Issue
Block a user