Add entity name translations to CO2signal (#90877)
This commit is contained in:
parent
e8cbf439e5
commit
03e9cb233f
2 changed files with 8 additions and 2 deletions
|
@ -35,13 +35,13 @@ class CO2SensorEntityDescription(SensorEntityDescription):
|
|||
SENSORS = (
|
||||
CO2SensorEntityDescription(
|
||||
key="carbonIntensity",
|
||||
name="CO2 intensity",
|
||||
translation_key="carbon_intensity",
|
||||
unique_id="co2intensity",
|
||||
# No unit, it's extracted from response.
|
||||
),
|
||||
CO2SensorEntityDescription(
|
||||
key="fossilFuelPercentage",
|
||||
name="Grid fossil fuel percentage",
|
||||
translation_key="fossil_fuel_percentage",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
),
|
||||
)
|
||||
|
|
|
@ -30,5 +30,11 @@
|
|||
"unknown": "[%key:common::config_flow::error::unknown%]",
|
||||
"api_ratelimit": "API Ratelimit exceeded"
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"carbon_intensity": { "name": "CO2 intensity" },
|
||||
"fossil_fuel_percentage": { "name": "Grid fossil fuel percentage" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue