krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
449 stars 47 forks source link

MSS310H energy monitor #109

Closed ster1um closed 2 years ago

ster1um commented 3 years ago

Hello, the integration work flawless but the energy monitor in this device show Wh instead of kWh. It's possible modified this value?

krahabb commented 3 years ago

Hello @ster1um , I've decided in the beginning to report that in Wh since it was 'more' in range with my usual experience about the daily power consumption for the plug appliance. Nevertheless, I see it may be desirable sometimes to have the value in kWh. I'll see if I can introduce a configuration flag for setting the energy unit to kWh instead of Wh

ster1um commented 3 years ago

Hello @krahabb, Thanks for quick response. I know with daily use it doesn't not change anything. If you in next release introduce this feature to switch from wh to kwh It would be greatly appreciated.

krahabb commented 2 years ago

Hello @ster1um , I'm going to release an update in the coming days but I think the feature to choose the energy unit will be 'out of reach' not because it's too difficult to implement but for a 'phylosophic' reason:

I know this should turn out to be a user 'responsible' choice but I'm a bit scared of the issues that would come through anyway.

I think you could still setup a template sensor in order to scale the native meross_lan sensor values and accomplish this scale change 'cleanly' on a new entity

I'm nevertheless open to the discussion and I'm not closing this down with a 'will never do' statement ;)

purcell-lab commented 2 years ago

I would like to put forward an alternative viewpoint.

I use MSS310 for monitoring and control of a number of households appliances; fridge, dryer, microwave and office using Meross_LAN, which works well. Daily device energy (Wh) are included in the HA energy dashboard (displayed as kWh) and I have a template to track the sum of instant power (W) of my household appliances. I find it very useful that the integration resets daily energy (Wh) consumption, but the energy dashboard then automatically calculates energy (kWh) over day, week, month, and yearly intervals, without the need for templates.

Thus going forward it is good if integration sensors reported in base units (in this case V, A, W & Wh) and the display layer (Lovelace or Dashboards) determine the relevant prefix k, M or whatever. Users can always do their own scaling though templates.