diff --git a/custom_components/erse/sensor.py b/custom_components/erse/sensor.py index 6abc8f9..c345497 100644 --- a/custom_components/erse/sensor.py +++ b/custom_components/erse/sensor.py @@ -442,7 +442,7 @@ async def calc_costs(meter_state): if meter_state.state in [STATE_UNAVAILABLE, STATE_UNKNOWN]: kwh = 0 elif ( - meter_state.attributes[ATTR_UNIT_OF_MEASUREMENT] == UnitOfEnergy.ENERGY_WATT_HOUR + meter_state.attributes[ATTR_UNIT_OF_MEASUREMENT] == UnitOfEnergy.WATT_HOUR ): kwh = float(meter_state.state) / 1000 else: