From 1458684a12d2731e5a810184c9e4905f3a92aef9 Mon Sep 17 00:00:00 2001 From: Manuel Date: Tue, 2 Jul 2024 11:05:53 +0200 Subject: [PATCH] Fixed timeout = 0 problems --- CHANGELOG.md | 3 ++- dbus-mqtt-grid/dbus-mqtt-grid.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 758803e..3d59d25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Changelog -## v0.1.5 (not releaded yet) +## v0.1.5 * Added: Error handling +* Changed: Fixed problems when timeout was set to `0`. * Changed: Handling when voltage=0 is provided and no current ## v0.1.4 diff --git a/dbus-mqtt-grid/dbus-mqtt-grid.py b/dbus-mqtt-grid/dbus-mqtt-grid.py index d9319d4..cd9d618 100644 --- a/dbus-mqtt-grid/dbus-mqtt-grid.py +++ b/dbus-mqtt-grid/dbus-mqtt-grid.py @@ -382,7 +382,7 @@ def __init__( self._dbusservice.add_path("/ProductId", 0xFFFF) self._dbusservice.add_path("/ProductName", productname) self._dbusservice.add_path("/CustomName", customname) - self._dbusservice.add_path("/FirmwareVersion", "0.1.5 (20231219)") + self._dbusservice.add_path("/FirmwareVersion", "0.1.5 (20240702)") # self._dbusservice.add_path('/HardwareVersion', '') self._dbusservice.add_path("/Connected", 1) @@ -652,7 +652,7 @@ def main(): ) # check if timeout was exceeded - if timeout <= (i * 5): + if timeout != 0 and timeout <= (i * 5): logging.error( "Driver stopped. Timeout of %i seconds exceeded, since no new MQTT message was received in this time." % timeout