Skip to content

Commit f34db54

Browse files
committed
poller: home assistant pushes
1 parent bc8b936 commit f34db54

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "python-pylontech-ext"
3-
version = "0.4.4"
3+
version = "0.4.5"
44
description = "Interfaces with Pylontech Batteries using RS485 protocol"
55
authors = [
66
{ name = "Frank Villaro-Dixon", email = "[email protected]" },

src/pylontechpoller/reporter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def __init__(self, hass_url, hass_stack_disbalance, hass_max_battery_disbalance,
5252

5353
def report_state(self, state):
5454
md = state["max_module_disbalance"]
55-
self.update_hass_state(self.hass_stack_disbalance, state["stack_disbalance"])
56-
self.update_hass_state(self.hass_max_battery_disbalance, md[1])
55+
self.update_hass_state(self.hass_stack_disbalance, int(state["stack_disbalance"] * 10000) / 10000.0)
56+
self.update_hass_state(self.hass_max_battery_disbalance, int(md[1] * 10000) / 10000.0)
5757
self.update_hass_state(self.hass_max_battery_disbalance_id, md[0])
5858

5959
def update_hass_state(self, id, value):

0 commit comments

Comments
 (0)