ha-emporia-vue icon indicating copy to clipboard operation
ha-emporia-vue copied to clipboard

1min sensors different device class / unit of measurement to 1d and 1mon

Open iainfogg opened this issue 2 years ago • 3 comments

Hi, I'm assuming this is an issue - apologies if I've misunderstood.

I'd expected the 1min sensors to be the same as the 1d and 1mon sensors i.e. device_class = energy, unit_of_measurement = kWh, but the 1min ones show as power / W instead.

Is this a bug?

I was planning on building some calculations based on the energy usage in each 1min period, but that relies on it being kWh instead of W.

iainfogg avatar Feb 06 '23 19:02 iainfogg

Not a bug, the 1 minute data is the same as in the app: the average power over a one minute interval. To convert to energy you just need to multiply by a time, ie 2500 watts over a minute uses 2500W * 1m * 1hr/60m = 41.67 Watt-hour. Kilowatt-hour is just divide that again by 1000, ie 0.04167kWh.

magico13 avatar Feb 06 '23 20:02 magico13

Thanks, I'd not spotted that, thanks for clarifying

On Mon, 6 Feb 2023, 20:10 Mike Marvin, @.***> wrote:

Not a bug, the 1 minute data is the same as in the app: the average power over a one minute interval. To convert to energy you just need to multiply by a time, ie 2500 watts over a minute uses 2500W * 1m * 1hr/60m = 41.67 Watt-hour. Kilowatt-hour is just divide that again by 1000, ie 0.04168kWh.

— Reply to this email directly, view it on GitHub https://github.com/magico13/ha-emporia-vue/issues/179#issuecomment-1419681729, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVULOJ2MPPDJIQTSEC35WTWWFLBZANCNFSM6AAAAAAUTC4CZ4 . You are receiving this because you authored the thread.Message ID: @.***>

iainfogg avatar Feb 08 '23 19:02 iainfogg

Hello, how i can add this on all sensor please ?

PAPAMICA avatar Feb 21 '23 01:02 PAPAMICA