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

Support for HA Energy Dashboard Positive Values

Open quadflight opened this issue 2 years ago • 10 comments

Thank you for all the hard work.

As mentioned in the previous HA energy thread any possibility of adding additional positive value sensors for all default negative value sensors? Example for mains to grid, solar CTs, etc.

quadflight avatar Aug 10 '21 21:08 quadflight

I was just coming here to do just this, open the issue.

Ragingfire105 avatar Aug 11 '21 02:08 Ragingfire105

I'll just add that one of my other components has added energy support and it doesn't seem to be super complicated. You can look at the total code change to the sensor.py here: https://github.com/binsentsu/home-assistant-solaredge-modbus/pull/23/commits/273a1b354588ab40bf06edd31ef28af0331be761#diff-fe3bf793492c4fbfdc1f0a74f261add8bc5a1ced6db0af1c52ae933825bf55ca

jhuang0 avatar Aug 11 '21 06:08 jhuang0

Lol, same.. I think the energy dashboard does not like the negative value for Mains to Grid.

skynet01 avatar Aug 11 '21 19:08 skynet01

For those of you with solar, is MainsToGrid the only negative channel (other than the main one when you have excess)? Do you have individual sensors for your solar panel breaker(s) that also show up negative? I think those should remain negative and only MainsToGrid should be flipped but I want to double check.

Either way, please try the master branch version which now is flipping the MainsToGrid sensor to positive. That flip might cause the energy dashboard to get really confused since the value is going to go up by twice the absolute value but future readings should be correct. If that works then I'll push it out officially tonight.

If you're not sure how to load the master branch build then just go into HACS and select the reinstall option for the integration and then scroll to the bottom of the version list to "master". Then restart Home Assistant and it should be running that version and you should see that sensor update right away.

magico13 avatar Aug 11 '21 21:08 magico13

Thanks for such a fast update. MainsToGrid is the only negative channel. The live main power sometimes turns negative when the whole house uses less than what's being generated but that's correct behavior and is how Emporio app shows it as well. Ill try your master build tonight :)

skynet01 avatar Aug 11 '21 22:08 skynet01

Thanks for the quick update will test tonight.

Yes solar CTs show up as negative values, have multiple inverters and all of them show up as negative values.

I tried adding them to energy but readings are not accurate at least for me. I have template sensor that combine all solar values and invert to positive which I am using with energy and that matches up with vue dashboard total generation values.

quadflight avatar Aug 11 '21 22:08 quadflight

Can confirm. I have 2 clamps, one for each leg of my solar feed. When installed according to the manual the values show negative in the app and in the export.

I had a ticket out to emporia because I have some false readings at night from my solar legs. It's the power draw from the controller and micro inverters. About 5Ws all night long messing up the net usage slightly. What I was told by them was they currently can't differentiate flow direction for solar. They have plans to address this in an update later this year. Just an FYI.

Ragingfire105 avatar Aug 12 '21 01:08 Ragingfire105

After updating to the master branch the energy dashboard pulled in the value. And it displays it as a negative!? So you go and flip it so they can flip it. Seemed dumb to me so I put in an issue ticket on the HA side as well.

https://github.com/home-assistant/core/issues/54517

Ragingfire105 avatar Aug 12 '21 05:08 Ragingfire105

The master branch tracks the Export to grid values correct for me now. The sensor shows them positive and in the Energy dashboard, they show up correctly as negative

skynet01 avatar Aug 12 '21 16:08 skynet01

Yes, master branch out to grid works great. 👍

quadflight avatar Aug 13 '21 02:08 quadflight