Hello there, I try to improve my PV-Battery-system. Target is to adjust the Power-Input of the battery (Anker solar bank E1600, uptodate firmware and integration). Therefore I have several Shelly and Tapo plugs which tell how much power is actually needed (simple self-made sensor called “AktuellerVerbrauch
”).
For testing I could manage by using the Automation UI to change the entity “number.solarbank_e1600_system_einspeisevorgabe
” in dependency of the value of AktuellerVerbrauch
(Time-triggered (every Minute)) for several power intervals (0-200, 201-300 … 800+). The number.solarbank_e1600_system_einspeisevorgabe
changes as I want it - for each interval to the respective x50 (150, 250 … 800).
Sometimes the power consumption is at e.g. 290, which is far away of 250 of the automated input. I think that can be a bit nearer to the actual power consumption. So I think I can calculate a better value for number.solarbank_e1600_system_einspeisevorgabe
:
My attempt is:
number.solarbank_e1600_system_einspeisevorgabe = (((( states('AktuellerVerbrauch') * 1,1 / 10 ) |float) |round(0) * 10) |float ) |round(0)
(the number.solarbank_e1600_system_einspeisevorgabe
can only be between 150 and 800 and also only devidable by 10 (160,170…). That’s why there is the rounding etc.
But how do I get it into the Automation UI or YAML? Actually I tried to write it into the “Define Variable Box” but after saving the calculation (several syntax tried) is changed to
variables:
sensor.solarbank_e1600_einspeisevorgabe:
"[object Object]": null
Hope you can understand my problem and help me out. Thanks in Advance.