Skip to content

Commit

Permalink
Send out the balancing state via MQTT
Browse files Browse the repository at this point in the history
  • Loading branch information
bjpirt committed Dec 2, 2023
1 parent e3a0299 commit 9137f34
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bms/mqtt_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def _publish(self):
f"/modules/{module_index}/cells/{cell_index}/fault", int(cell.fault))
self._publish_topic(
f"/modules/{module_index}/cells/{cell_index}/alert", int(cell.alert))
self._publish_topic(
f"/modules/{module_index}/cells/{cell_index}/balancing", int(cell.balancing))

def _publish_topic(self, topic: str, value: Union[int, bool, float]) -> None:
self._client.publish(f"{self._config.mqtt_topic_prefix}{topic}", json.dumps(
Expand Down

0 comments on commit 9137f34

Please sign in to comment.