reptilex / tesla-style-solar-power-card

Home assistant power card mimicking the one tesla provides for the powerwall app.
221 stars 59 forks source link

Values shown are 10x the actual sensor value #127

Closed MatteoGalet closed 1 year ago

MatteoGalet commented 2 years ago

Hello, I noticed on my install the values shown in the bubbles are 10x the actual values calculated from the flows. EG. sensors that constitute the flows are read correctly in HomeAssistant, and add up to 3.2kW (3200w), but bubble shows 32kW (32000w). What is going on there?

OneScuzzie2k commented 2 years ago

Same issue here, mine is showing 95.3KW when it should be 0.95kw

OneScuzzie2k commented 2 years ago

In matter of fact the more entries I put in the more strange values I get!

MatteoGalet commented 2 years ago

Update: seems like if I use "w" as unit for the flow sensors, the sensor is multiplied by 10x. If I use unit "W" to define the sensor, all is good. Go figure...

OneScuzzie2k commented 2 years ago

Thanks sorted for me too

tomcoleman commented 2 years ago

getting same issue can you expand on how you fixed?

image

MatteoGalet commented 2 years ago

getting same issue can you expand on how you fixed?

Well, this looks like another different problem...

tomcoleman commented 2 years ago

with no replies in years to the main code or support / bug questions i think the dev has dropped this project - it could have been really good

reptilex commented 2 years ago

they exchanged "w" for "W" as stated in the documentation.

And not responding to every configuration error people have does not mean that the project is dead. And just for your information @tomcoleman this is an open source project, meaning 2 things. 1. Most probably it's a hobby for someone and 2. anyone who needs something can contribute.

But going back to the problem, I might be able to change this soon, but not during my vacation, sorry

tomcoleman commented 2 years ago

they exchanged "w" for "W" as stated in the documentation.

And not responding to every configuration error people have does not mean that the project is dead. And just for your information @tomcoleman this is an open source project, meaning 2 things. 1. Most probably it's a hobby for someone and 2. anyone who needs something can contribute.

But going back to the problem, I might be able to change this soon, but not during my vacation, sorry

cool lets make it the best

mgerald21 commented 1 year ago

Is that line probably the source of the 10x value error?

https://github.com/reptilex/tesla-style-solar-power-card/blob/55b06a1890eb059fad12ded85d9d9f1174b4f7ca/src/TeslaStyleSolarPowerCard.ts#L635

edit: sorry, no looks like that's just the width calculation of energy flow

reptilex commented 1 year ago

no, that should divide by 1000 so that when you don't have kW but only W it calculates with kW internally