Coder Social home page Coder Social logo

Energy units about ha-sunspec HOT 8 CLOSED

cjne avatar cjne commented on August 30, 2024
Energy units

from ha-sunspec.

Comments (8)

marpi82 avatar marpi82 commented on August 30, 2024 1

Yes, it works with both Wh and kWh, if you have problem it’s likely something else however I had the same problem as you until I changed like I wrote above. Have you tried it?

@Spitfire69 in fact, you are right. I have suggested with this information in parentheses that energy should be in kWh without checking this. Even when it is - as in this case - in Wh, everything is converted correctly by HA.

So I'am closing the issue - because I also do not care about displaying this value in a specific unit. I didn't have to customize anything and everything is fine.

I just made a wrong suggestion on what was written without checking this. Sorry

from ha-sunspec.

Spitfire69 avatar Spitfire69 commented on August 30, 2024

Just change it in your customize.yaml file:
sensor.inverter_ac_energy:
unit_of_measurement: 'Wh'

from ha-sunspec.

marpi82 avatar marpi82 commented on August 30, 2024

Just change it in your customize.yaml file:
sensor.inverter_ac_energy:
unit_of_measurement: 'Wh'

The value and the unit is displayed correctly, until today I have produced 12.941668MWh, i.e. 12 941.668kWh, i.e. 12 941 668Wh. So everything is correct. But it should be displayed in HA in kWh units only (not in Wh) that the energy module could correctly interpret the value of energy produced.

If the value is taken from inverter in Wh, it should be divided by 1000 and displayed in kWh. These is the problem

from ha-sunspec.

marpi82 avatar marpi82 commented on August 30, 2024

[...] As You can see here.

Solar production energy (kWh) - but my sensor is in Wh
IMG_20210903_145425

from ha-sunspec.

CJNE avatar CJNE commented on August 30, 2024

My inverter also has solar energy in Wh and that works fine with the energy dashboard, can you look at the entity you expected to use there in the developer tools and look at what attributes it has?

from ha-sunspec.

Spitfire69 avatar Spitfire69 commented on August 30, 2024

Yes, it works with both Wh and kWh, if you have problem it’s likely something else however I had the same problem as you until I changed like I wrote above. Have you tried it?

from ha-sunspec.

CJNE avatar CJNE commented on August 30, 2024

I'm not agains changing to kWh, it's just that it might not be the issue. Ideally you shouldn't have to do the customization step so perhaps there is something that needs to be changed.

from ha-sunspec.

CJNE avatar CJNE commented on August 30, 2024

No worries :)

from ha-sunspec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.