|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 |
|
17 | 17 | __author__ = "Tobias Kraft" |
18 | | -__version__ = "1.89" |
| 18 | +__version__ = "1.90" |
19 | 19 |
|
20 | 20 | import requests |
21 | 21 | import time |
@@ -459,11 +459,13 @@ def GetCheckBattery(): |
459 | 459 | DTU.WaitForAck(i, SET_LIMIT_TIMEOUT_SECONDS) |
460 | 460 | SetLimit.LastLimit = -1 |
461 | 461 | HOY_BATTERY_GOOD_VOLTAGE[i] = True |
462 | | - HOY_MAX_WATT[i] = GetBatteryNormalWatt(i) |
| 462 | + if (minVoltage >= HOY_BATTERY_THRESHOLD_NORMAL_LIMIT_IN_V[i]) and (HOY_MAX_WATT[i] != CONFIG_PROVIDER.get_normal_wattage(i)): |
| 463 | + HOY_MAX_WATT[i] = CONFIG_PROVIDER.get_normal_wattage(i) |
| 464 | + SetLimit.LastLimit = -1 |
463 | 465 |
|
464 | 466 | elif minVoltage >= HOY_BATTERY_THRESHOLD_NORMAL_LIMIT_IN_V[i]: |
465 | | - if HOY_MAX_WATT[i] != GetBatteryNormalWatt(i): |
466 | | - HOY_MAX_WATT[i] = GetBatteryNormalWatt(i) |
| 467 | + if HOY_MAX_WATT[i] != CONFIG_PROVIDER.get_normal_wattage(i): |
| 468 | + HOY_MAX_WATT[i] = CONFIG_PROVIDER.get_normal_wattage(i) |
467 | 469 | SetLimit.LastLimit = -1 |
468 | 470 |
|
469 | 471 | if HOY_BATTERY_GOOD_VOLTAGE[i]: |
@@ -522,12 +524,6 @@ def GetMinWatt(pInverter: int): |
522 | 524 | min_watt_percent = CONFIG_PROVIDER.get_min_wattage_in_percent(pInverter) |
523 | 525 | return int(HOY_INVERTER_WATT[pInverter] * min_watt_percent / 100) |
524 | 526 |
|
525 | | -def GetBatteryNormalWatt(pInverter: int): |
526 | | - normal_watt = CONFIG_PROVIDER.get_normal_wattage(pInverter) |
527 | | - if normal_watt > HOY_MAX_WATT[pInverter]: |
528 | | - normal_watt = HOY_MAX_WATT[pInverter] |
529 | | - return normal_watt |
530 | | - |
531 | 527 | def CutLimitToProduction(pSetpoint): |
532 | 528 | if pSetpoint != GetMaxWattFromAllInverters(): |
533 | 529 | ActualPower = GetHoymilesActualPower() |
|
0 commit comments