@@ -301,6 +301,28 @@ class RefossSensorDescription(RefossEntityDescription, SensorEntityDescription):
301301 device_class = SensorDeviceClass .ENERGY ,
302302 state_class = SensorStateClass .TOTAL_INCREASING ,
303303 ),
304+ "em_total_energy" : RefossSensorDescription (
305+ key = "em" ,
306+ sub_key = "total_energy" ,
307+ name = "Total Energy" ,
308+ native_unit_of_measurement = UnitOfEnergy .KILO_WATT_HOUR ,
309+ value = lambda status , _ : None if status is None else float (status ),
310+ suggested_display_precision = 2 ,
311+ device_class = SensorDeviceClass .ENERGY ,
312+ state_class = SensorStateClass .TOTAL_INCREASING ,
313+ supported = lambda status : status .get ("total_energy" ) is not None ,
314+ ),
315+ "em_total_ret_energy" : RefossSensorDescription (
316+ key = "em" ,
317+ sub_key = "total_ret_energy" ,
318+ name = "Total Return Energy" ,
319+ native_unit_of_measurement = UnitOfEnergy .KILO_WATT_HOUR ,
320+ value = lambda status , _ : None if status is None else float (abs (status )),
321+ suggested_display_precision = 2 ,
322+ device_class = SensorDeviceClass .ENERGY ,
323+ state_class = SensorStateClass .TOTAL_INCREASING ,
324+ supported = lambda status : status .get ("total_ret_energy" ) is not None ,
325+ ),
304326}
305327
306328
0 commit comments