Giter VIP home page Giter VIP logo

Comments (6)

anton4 avatar anton4 commented on July 24, 2024

Sofar hybrid 5K...20KTL-3PH have the same issue, all power sensors are in kW and not in W and have to use template to divide the values with 1000.

from emhass.

pjvenda avatar pjvenda commented on July 24, 2024

so... I took a stab at it: #292

from emhass.

purcell-lab avatar purcell-lab commented on July 24, 2024

One interesting effect is text sensors are character limited to 255.

If you have 48x intervals in Watt [12000, 13000, 14000, ...] each interval using 7 characters, 48x intervals requires 366 characters, which cannot be represented in a input_text sensor, but can be in attributes which are difficult to store.

For this reason I currently calculate my load power forecast array in kW and convert back to W in the payload:

{{states('sensor.power_load_no_var_loads')|int(0)}}
{{ states('input_text.fi_fo_buffer')}}
{{ states('input_text.fi_fo_buffer')|length}}          

"load_power_forecast": {{
          ([states('sensor.power_load_no_var_loads')|int(0)]
          + (states('input_text.fi_fo_buffer').split(', ')|map('multiply',1000)|map('int')|list)[1:])}}
1185
0.4, 1.1, 1.1, 0.4, 1.1, 1.1, 1.0, 1.3, 1.4, 1.3, 2.0, 1.5, 1.6, 2.0, 1.6, 1.7, 6.8, 1.5, 1.6, 2.0, 1.7, 1.8, 0.3, 0.3, 0.6, 1.2, 1.6, 2.8, 1.6, 0.4, 0.3, 2.2, 0.5, 1.0, 0.3, 0.3, 0.5, 0.4, 0.4, 0.6, 0.7, 1.3, 1.4, 1.2, 1.1, 1.0, 1.0, 1.1
238          

"load_power_forecast": [1185, 1100, 1100, 400, 1100, 1100, 1000, 1300, 1400, 1300, 2000, 1500, 1600, 2000, 1600, 1700, 6800, 1500, 1600, 2000, 1700, 1800, 300, 300, 600, 1200, 1600, 2800, 1600, 400, 300, 2200, 500, 1000, 300, 300, 500, 400, 400, 600, 700, 1300, 1400, 1200, 1100, 1000, 1000, 1100]

from emhass.

pjvenda avatar pjvenda commented on July 24, 2024

from emhass.

purcell-lab avatar purcell-lab commented on July 24, 2024

So are you suggesting this change is not viable due to the way that the array of load values is stored in an input_text?

No suggesting quite the opposite.

I'm my experience it becomes difficult to store an array of 48x timeslots in W in an input_text, but an array of 48x timeslots in kW is easier to store in an input_text.

So your PR is very welcome.

from emhass.

pjvenda avatar pjvenda commented on July 24, 2024

from emhass.

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.