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,9 +134,9 @@ def write_holding_register(var_value):
134 134
     )
135 135
 
136 136
     try:
137
-        casted_value = int(var_value.value) + (1 << 16)
137
+        casted_value = (int(var_value.value) + (1 << 16)
138 138
             if (var_value.value < 0)
139
-            else int(var_value.value)
139
+            else int(var_value.value))
140 140
 
141 141
         req_adu = rtu.write_single_register(
142 142
             slave_id=1,

Loading…
Cancel
Save