Skip to content

Commit

Permalink
reduce floats to 4 decimal places in global state and message bus
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaDodds committed Jul 1, 2023
1 parent 622ff00 commit 64a2e77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def get_seasonally_adjusted_max_charge_slots(batt_soc: float) -> int:


def reduce_decimal(value):
value = str(value)

if '.' in value:
try:
float_value = float(value)
Expand Down

0 comments on commit 64a2e77

Please sign in to comment.