svenerbe / ecoflow_dynamic_power_adjustment

Service Description: EcoFlow Device API Integration for Power Stream Control
56 stars 6 forks source link

Script adds the sent value to the setting, not replacing it #8

Closed yoginaut closed 7 months ago

yoginaut commented 7 months ago

He everybody, I managed to get the script running using the description, thanks a lot for providing it! I can see that it is working somehow but not as I expect it to work: every time the script sends a value to my powerstream in the powerstream settings the value is not replaced but added. Example: the current value in the Ecoflow app under Household power demand shows 320W. The HA Automation triggers and the sent value is 15. In the app the value changes to 335W and not to 15W. So over time the powerstream setting always goes to 600W. I would expect that the value changes to the sent 15W.

Any idea why this happens?

svenerbe commented 7 months ago

"The script functions as intended! Its purpose is to ensure minimal power flow to the grid, ideally achieving zero wattage. Essentially, your power sensor captures data regarding power exchanges with the grid and transmits it to the service. The service then calculates the variance in power, supplementing it with your household's current power consumption."

yoginaut commented 7 months ago

ok, I had a twist in my brain. If the current value is negative the script also sends a negative value to the Powerstream. So as you said, works as intended! Thank you 👍

MhlTheOne commented 7 months ago

In some case i want to set an fix value. I adapted the script for this and used it with parameter automation = false.

See here: https://github.com/svenerbe/ecoflow_dynamic_power_adjustment/issues/5#issuecomment-2079570151