Skip to content

Commit

Permalink
Reverse battery sensors direction
Browse files Browse the repository at this point in the history
  • Loading branch information
vortizhe committed Feb 17, 2023
1 parent 6ddc722 commit 89b68ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/ingeteam_modbus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ def read_modbus_data_battery(self):

self.data["battery_voltage"] = battery_voltage / 10
self.data["battery_current"] = battery_current / 100
self.data["battery_discharging_power"] = battery_power * -1 if battery_power < 0 else 0
self.data["battery_charging_power"] = battery_power if battery_power > 0 else 0
self.data["battery_discharging_power"] = battery_power if battery_power > 0 else 0
self.data["battery_charging_power"] = battery_power * -1 if battery_power < 0 else 0
self.data["battery_state_of_charge"] = battery_state_of_charge
self.data["battery_state_of_health"] = battery_state_of_health
self.data["battery_charging_voltage"] = battery_charging_voltage / 10
Expand Down

0 comments on commit 89b68ac

Please sign in to comment.