From d4ed0f9637af69020bc9ef2344ad876688583666 Mon Sep 17 00:00:00 2001 From: deosrc Date: Thu, 30 Sep 2021 11:31:06 +0100 Subject: [PATCH] Fix OVO Energy reporting consumption as cost (#55856) --- homeassistant/components/ovo_energy/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/ovo_energy/sensor.py b/homeassistant/components/ovo_energy/sensor.py index 0afca4f84f2..17f92a3b2e2 100644 --- a/homeassistant/components/ovo_energy/sensor.py +++ b/homeassistant/components/ovo_energy/sensor.py @@ -58,7 +58,7 @@ SENSOR_TYPES_ELECTRICITY: tuple[OVOEnergySensorEntityDescription, ...] = ( name="OVO Last Electricity Cost", device_class=DEVICE_CLASS_MONETARY, state_class=STATE_CLASS_TOTAL_INCREASING, - value=lambda usage: usage.electricity[-1].consumption, + value=lambda usage: usage.electricity[-1].cost.amount, ), OVOEnergySensorEntityDescription( key="last_electricity_start_time", @@ -92,7 +92,7 @@ SENSOR_TYPES_GAS: tuple[OVOEnergySensorEntityDescription, ...] = ( device_class=DEVICE_CLASS_MONETARY, state_class=STATE_CLASS_TOTAL_INCREASING, icon="mdi:cash-multiple", - value=lambda usage: usage.gas[-1].consumption, + value=lambda usage: usage.gas[-1].cost.amount, ), OVOEnergySensorEntityDescription( key="last_gas_start_time",