Comments (8)
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.
It should be
pos / count - neg / count
.
Also, it shouldn't beint()
. Would be better to use something likeround(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.
Works on my machine (TM) :-)
from ha-ferroamp.
No domain knowledge at my end either but I see how you're thinking. @danielolsson100 or @mickecamino perhaps knows more?
from ha-ferroamp.
@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.
The value from Ferroamp is a float, so it should be a float in the code:
from ha-ferroamp.
It should be
pos / count - neg / count
.Also, it shouldn't be
int()
. Would be better to use something likeround(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.
Hmmm, it seems that I looked at the wrong sensor, Here is the correct one:
from ha-ferroamp.
Related Issues (20)
- Sensors not working HOT 5
- Issue with v1.10.2 HOT 28
- Control Status = unavailable after HA restart
- Add scan_interval to the scrape documentation HOT 2
- Question: How to keep history for external voltage for each phase? HOT 7
- Use HA precision instead of own precision config and handling
- Control maximum export from HA HOT 3
- Additional SSO Fault codes HOT 3
- vscode devcontainer support? HOT 2
- Entities in 1.14.0 shows too many decimals HOT 3
- Possible bug on FaultCodeSensor HOT 2
- Battery sensor spamming logs HOT 14
- Sensors in energy wrong HOT 18
- Hi and thanks for the very good follow-up :), MQTT had to be turned on in the local ferroamp from the supplier. Everything now seems to work. HOT 6
- Any way to control EV/OCPP? HOT 2
- FR: Make prefix configuration editable
- Deprecated constants
- no sensors visible HOT 2
- version 5.5.0-FCR.1 ferroamp, known problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-ferroamp.