mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Add entity name translations to CO2signal (#90877)
This commit is contained in:
parent
e8cbf439e5
commit
03e9cb233f
@ -35,13 +35,13 @@ class CO2SensorEntityDescription(SensorEntityDescription):
|
|||||||
SENSORS = (
|
SENSORS = (
|
||||||
CO2SensorEntityDescription(
|
CO2SensorEntityDescription(
|
||||||
key="carbonIntensity",
|
key="carbonIntensity",
|
||||||
name="CO2 intensity",
|
translation_key="carbon_intensity",
|
||||||
unique_id="co2intensity",
|
unique_id="co2intensity",
|
||||||
# No unit, it's extracted from response.
|
# No unit, it's extracted from response.
|
||||||
),
|
),
|
||||||
CO2SensorEntityDescription(
|
CO2SensorEntityDescription(
|
||||||
key="fossilFuelPercentage",
|
key="fossilFuelPercentage",
|
||||||
name="Grid fossil fuel percentage",
|
translation_key="fossil_fuel_percentage",
|
||||||
native_unit_of_measurement=PERCENTAGE,
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -30,5 +30,11 @@
|
|||||||
"unknown": "[%key:common::config_flow::error::unknown%]",
|
"unknown": "[%key:common::config_flow::error::unknown%]",
|
||||||
"api_ratelimit": "API Ratelimit exceeded"
|
"api_ratelimit": "API Ratelimit exceeded"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"carbon_intensity": { "name": "CO2 intensity" },
|
||||||
|
"fossil_fuel_percentage": { "name": "Grid fossil fuel percentage" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user