Maxime Alves LIRMM@home 3 years ago
parent
commit
995bf12e6d
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      pyheatpump/modbus.py

+ 2
- 2
pyheatpump/modbus.py View File

134
     )
134
     )
135
 
135
 
136
     try:
136
     try:
137
-        casted_value = int(var_value.value) + (1 << 16)
137
+        casted_value = (int(var_value.value) + (1 << 16)
138
             if (var_value.value < 0)
138
             if (var_value.value < 0)
139
-            else int(var_value.value)
139
+            else int(var_value.value))
140
 
140
 
141
         req_adu = rtu.write_single_register(
141
         req_adu = rtu.write_single_register(
142
             slave_id=1,
142
             slave_id=1,

Loading…
Cancel
Save