invert logic cutoff register
Some checks failed
CI and deploy / migration-check (push) Failing after 14s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-04-29 13:24:28 +02:00
parent 9aceb628aa
commit 342483b885
6 changed files with 14 additions and 12 deletions

View File

@@ -28,7 +28,7 @@ DEYE_REG_GRID_EXPORT_TOTAL_LO = 524
DEYE_REG_GRID_EXPORT_TOTAL_HI = 525
DEYE_REG_PV1_POWER = 672
DEYE_REG_PV2_POWER = 673
# Solar sell (0 = přebytek řiditelné FVE nesmí do sítě) a GEN/MI cut-off (bits01 == 2 → cut-off ON); viz modbus-registers.md
# Solar sell (0 = přebytek řiditelné FVE nesmí do sítě) a GEN/MI cut-off (bits01 == 3 → cut-off ON); viz modbus-registers.md
DEYE_REG_SOLAR_SELL = 145
DEYE_REG_CONTROL_BOARD_SPECIAL1 = 179
@@ -48,7 +48,7 @@ def _export_limit_flags_from_deye_regs(reg145: int | None, reg179: int | None) -
flags = 0
if reg145 is not None and int(reg145) == 0:
flags |= 1
if reg179 is not None and (int(reg179) & 3) == 2:
if reg179 is not None and (int(reg179) & 3) == 3:
flags |= 2
return (flags != 0), flags