Skip to content

Commit

Permalink
Fixed bugs with types
Browse files Browse the repository at this point in the history
  • Loading branch information
jduncc committed Dec 10, 2024
1 parent 4e5c304 commit 0def6dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/victron/victron.star
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Author: jduncc
"""

load("http.star", "http")
load("math.star", "math")
load("render.star", "render")
load("schema.star", "schema")

Expand All @@ -28,8 +29,7 @@ def main(config):
}

else:
installationIndex = config.get("installation_index", 0)

installationIndex = int(config.get("installation_index", 0))
user = vrm_api(VRM_URL_USER, token, 600)

if (user["success"] != True):
Expand Down Expand Up @@ -97,8 +97,8 @@ def main(config):
expanded = True,
main_align = "space_evenly",
children = [
render.Text("%d DC" % parsed_diag["DCRaw"]),
render.Text(color = pvp_color, content = "%d PV" % parsed_diag["PVPRaw"]),
render.Text("%s DC" % math.floor(float(parsed_diag["DCRaw"]))),
render.Text(color = pvp_color, content = "%s PV" % math.floor(float(parsed_diag["PVPRaw"]))),
],
),
],
Expand Down

0 comments on commit 0def6dc

Please sign in to comment.