Add icon translations to ovo energy (#111997)

This commit is contained in:
Joost Lekkerkerker 2024-03-02 01:01:46 +01:00 committed by GitHub
parent ea6913d436
commit 8077654002
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": {
"last_gas_reading": {
"default": "mdi:gas-cylinder"
},
"last_gas_cost": {
"default": "mdi:cash-multiple"
}
}
}
}

View file

@ -81,7 +81,6 @@ SENSOR_TYPES_GAS: tuple[OVOEnergySensorEntityDescription, ...] = (
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
icon="mdi:gas-cylinder",
value=lambda usage: usage.gas[-1].consumption,
),
OVOEnergySensorEntityDescription(
@ -89,7 +88,6 @@ SENSOR_TYPES_GAS: tuple[OVOEnergySensorEntityDescription, ...] = (
translation_key=KEY_LAST_GAS_COST,
device_class=SensorDeviceClass.MONETARY,
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:cash-multiple",
value=lambda usage: usage.gas[-1].cost.amount
if usage.gas[-1].cost is not None
else None,