GithubHelp home page GithubHelp logo

Units about tesla-style-solar-power-card HOT 9 CLOSED

reptilex avatar reptilex commented on June 6, 2024
Units

from tesla-style-solar-power-card.

Comments (9)

dgomes avatar dgomes commented on June 6, 2024 1

Therefore the importance of showing the unit.

This is very common in various energy monitor interfaces.

But again, this can be a configuration variable.

from tesla-style-solar-power-card.

msim888 avatar msim888 commented on June 6, 2024

+1
Great job!
Would be very good to have that option - I found how to switch to W instead kW but it doesn't work very good so far.

from tesla-style-solar-power-card.

reptilex avatar reptilex commented on June 6, 2024

I think I got this covert now. Fresh from the oven, define use_w_not_kw in your yml configuration like this:
use_w_not_kw: 1
and you will have w instead of kw and it will not be divided by 1000. Your sensors do have to have the w unit though.
Please test it, if it works close the issue ;)

from tesla-style-solar-power-card.

dgomes avatar dgomes commented on June 6, 2024

Thank you soo much for considering this :)

But

  • its not W vs kW
  • its W if power < 1000 and kW if power > 1000

from tesla-style-solar-power-card.

reptilex avatar reptilex commented on June 6, 2024

won't this look funny when you have 30W solar power and you are using 2 kW? It would confuse the heck out of me. The change is just adding a var to the if statement but I find it's not user friendly that way.

from tesla-style-solar-power-card.

msim888 avatar msim888 commented on June 6, 2024

show_w_not_kw: 1 works very well but there is a problem with speed of cycles - it's too high when show_w_not_kw: 1

I guess the code should be something like this:

getSpeed(value) {
var speed = 0;
if (value > 0 && this.w_or_kw !== 'W') {
speed = 0.07 * value;
} else if (value > 0 && this.w_or_kw === 'W') {
speed = 0.00007 * value;
}
return speed;
}

from tesla-style-solar-power-card.

msim888 avatar msim888 commented on June 6, 2024

With the code above the speed is normal and everything looks good.
But I have some negative power values - I can use Math.abs() method of course but would be very good to have that option as config option. I mean the option to use negative power values.

from tesla-style-solar-power-card.

reptilex avatar reptilex commented on June 6, 2024

Your unreal "pull request" has been merged ;) Do you need a new release to test it? After that I would close the issue and create a new release

from tesla-style-solar-power-card.

msim888 avatar msim888 commented on June 6, 2024

Sorry, I'm not very good familiar with development process and github. Maybe a new release will be better. Thanks!

from tesla-style-solar-power-card.

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.