Skip to content

Commit 77e8f5e

Browse files
author
sfstar
authored
Merge pull request #277 from sfstar/bugfix/fix_v_0_4_0_introduced_decoding_errors
revert introduced decoding errors
2 parents 787f68f + d00dde5 commit 77e8f5e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

custom_components/victron/const.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ class vebus_error(Enum):
309309
"vebus_activein_activeinput": RegisterInfo(
310310
register=29, dataType=UINT16, entityType=TextReadEntityType(generic_activeinput)
311311
),
312-
"vebus_soc": RegisterInfo(30, UINT16, PERCENTAGE, 10, SliderWriteType()),
312+
"vebus_soc": RegisterInfo(
313+
30, UINT16, PERCENTAGE, 10, SliderWriteType(PERCENTAGE, False)
314+
),
313315
"vebus_state": RegisterInfo(
314316
register=31,
315317
dataType=UINT16,
@@ -641,7 +643,7 @@ class vebus_error(Enum):
641643
"battery_info_maxdischargecurrent": RegisterInfo(
642644
308, UINT16, UnitOfElectricCurrent.AMPERE, 10
643645
),
644-
"battery_capacity": RegisterInfo(309, UINT16, UnitOfEnergy.KILO_WATT_HOUR, 1000),
646+
"battery_capacity": RegisterInfo(309, UINT16, UnifOfElectricCurrent.AMPERE, 10),
645647
"battery_diagnostics_lasterror_1_time": RegisterInfo(310, INT32, "timestamp"),
646648
"battery_diagnostics_lasterror_2_time": RegisterInfo(312, INT32, "timestamp"),
647649
"battery_diagnostics_lasterror_3_time": RegisterInfo(314, INT32, "timestamp"),
@@ -767,10 +769,10 @@ class battery_error(Enum):
767769
"battery_system_batteriesseries": RegisterInfo(1288, UINT16),
768770
"battery_system_numberofcellsperbattery": RegisterInfo(1289, UINT16),
769771
"battery_system_mincellvoltage": RegisterInfo(
770-
1290, UINT16, UnitOfElectricPotential.VOLT, 1000
772+
1290, UINT16, UnitOfElectricPotential.VOLT, 100
771773
),
772774
"battery_system_maxcellvoltage": RegisterInfo(
773-
1291, UINT16, UnitOfElectricPotential.VOLT, 1000
775+
1291, UINT16, UnitOfElectricPotential.VOLT, 100
774776
),
775777
"battery_diagnostics_shutdownsdueerror": RegisterInfo(1292, UINT16),
776778
"battery_diagnostics_lasterror_1": RegisterInfo(
@@ -1007,9 +1009,9 @@ class generic_mppoperationmode(Enum):
10071009

10081010

10091011
class generic_position(Enum):
1010-
MANUAL = 0
1011-
AUTO = 1
1012-
SCHEDULED = 2
1012+
AC_INPUT_1 = 0
1013+
AC_OUTPUT = 1
1014+
AC_INPUT_2 = 2
10131015

10141016

10151017
pvinverter_registers = {

0 commit comments

Comments
 (0)