mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Add icon translations to ovo energy (#111997)
This commit is contained in:
parent
ea6913d436
commit
8077654002
12
homeassistant/components/ovo_energy/icons.json
Normal file
12
homeassistant/components/ovo_energy/icons.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"last_gas_reading": {
|
||||||
|
"default": "mdi:gas-cylinder"
|
||||||
|
},
|
||||||
|
"last_gas_cost": {
|
||||||
|
"default": "mdi:cash-multiple"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -81,7 +81,6 @@ SENSOR_TYPES_GAS: tuple[OVOEnergySensorEntityDescription, ...] = (
|
|||||||
device_class=SensorDeviceClass.ENERGY,
|
device_class=SensorDeviceClass.ENERGY,
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
||||||
icon="mdi:gas-cylinder",
|
|
||||||
value=lambda usage: usage.gas[-1].consumption,
|
value=lambda usage: usage.gas[-1].consumption,
|
||||||
),
|
),
|
||||||
OVOEnergySensorEntityDescription(
|
OVOEnergySensorEntityDescription(
|
||||||
@ -89,7 +88,6 @@ SENSOR_TYPES_GAS: tuple[OVOEnergySensorEntityDescription, ...] = (
|
|||||||
translation_key=KEY_LAST_GAS_COST,
|
translation_key=KEY_LAST_GAS_COST,
|
||||||
device_class=SensorDeviceClass.MONETARY,
|
device_class=SensorDeviceClass.MONETARY,
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
icon="mdi:cash-multiple",
|
|
||||||
value=lambda usage: usage.gas[-1].cost.amount
|
value=lambda usage: usage.gas[-1].cost.amount
|
||||||
if usage.gas[-1].cost is not None
|
if usage.gas[-1].cost is not None
|
||||||
else None,
|
else None,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user