Git Product home page Git Product logo

Comments (8)

jonasbkarlsson avatar jonasbkarlsson commented on July 25, 2024 1

It should be pos / count - neg / count.

Also, it shouldn't be int(). Would be better to use something like round(float(pos / count - neg / count), 2).

from ha-ferroamp.

bj00rn avatar bj00rn commented on July 25, 2024 1

It should be pos / count - neg / count.
Also, it shouldn't be int(). Would be better to use something like round(float(pos / count - neg / count), 2).

That would result in ~760 in the case @bj00rn had, right? Can someone provide a PR with those changes?

I can give it a shot

from ha-ferroamp.

bj00rn avatar bj00rn commented on July 25, 2024 1

Works on my machine (TM) :-)

Screenshot_20230709-133043

from ha-ferroamp.

argoyle avatar argoyle commented on July 25, 2024

No domain knowledge at my end either but I see how you're thinking. @danielolsson100 or @mickecamino perhaps knows more?

from ha-ferroamp.

danielolsson100 avatar danielolsson100 commented on July 25, 2024

@argoyle I have no clue in this matter since I am not using this value at all, I don't even store the history data in the DB for this sensor ;)

from ha-ferroamp.

mickecamino avatar mickecamino commented on July 25, 2024

The value from Ferroamp is a float, so it should be a float in the code:
SSO-MQTT

from ha-ferroamp.

argoyle avatar argoyle commented on July 25, 2024

It should be pos / count - neg / count.

Also, it shouldn't be int(). Would be better to use something like round(float(pos / count - neg / count), 2).

That would result in ~760 in the case @bj00rn had, right? Can someone provide a PR with those changes?

from ha-ferroamp.

mickecamino avatar mickecamino commented on July 25, 2024

Hmmm, it seems that I looked at the wrong sensor, Here is the correct one:
dclink-voltage

from ha-ferroamp.

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.