forked from home-assistant/core
Fix OVO Energy reporting consumption as cost (#55856)
This commit is contained in:
@@ -58,7 +58,7 @@ SENSOR_TYPES_ELECTRICITY: tuple[OVOEnergySensorEntityDescription, ...] = (
|
|||||||
name="OVO Last Electricity Cost",
|
name="OVO Last Electricity Cost",
|
||||||
device_class=DEVICE_CLASS_MONETARY,
|
device_class=DEVICE_CLASS_MONETARY,
|
||||||
state_class=STATE_CLASS_TOTAL_INCREASING,
|
state_class=STATE_CLASS_TOTAL_INCREASING,
|
||||||
value=lambda usage: usage.electricity[-1].consumption,
|
value=lambda usage: usage.electricity[-1].cost.amount,
|
||||||
),
|
),
|
||||||
OVOEnergySensorEntityDescription(
|
OVOEnergySensorEntityDescription(
|
||||||
key="last_electricity_start_time",
|
key="last_electricity_start_time",
|
||||||
@@ -92,7 +92,7 @@ SENSOR_TYPES_GAS: tuple[OVOEnergySensorEntityDescription, ...] = (
|
|||||||
device_class=DEVICE_CLASS_MONETARY,
|
device_class=DEVICE_CLASS_MONETARY,
|
||||||
state_class=STATE_CLASS_TOTAL_INCREASING,
|
state_class=STATE_CLASS_TOTAL_INCREASING,
|
||||||
icon="mdi:cash-multiple",
|
icon="mdi:cash-multiple",
|
||||||
value=lambda usage: usage.gas[-1].consumption,
|
value=lambda usage: usage.gas[-1].cost.amount,
|
||||||
),
|
),
|
||||||
OVOEnergySensorEntityDescription(
|
OVOEnergySensorEntityDescription(
|
||||||
key="last_gas_start_time",
|
key="last_gas_start_time",
|
||||||
|
Reference in New Issue
Block a user