Skip to content

Commit 38144fe

Browse files
committed
Fix compatibility issues with old FW that doesn't support LWT
1 parent bb2b42c commit 38144fe

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

inelsmqtt/devices/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,9 @@ def is_available(self) -> bool:
140140
bool: True/False
141141
"""
142142
gw = self.__mqtt.messages().get(self._Device__gw_connected_topic)
143-
if not GW_CONNECTED.get(gw):
144-
return False
143+
if gw is not None:
144+
if not GW_CONNECTED.get(gw):
145+
return False
145146

146147
val = self.__mqtt.messages().get(self._Device__connected_topic)
147148
if isinstance(val, (bytes, bytearray)):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name="elkoep-mqtt",
6-
version="0.2.27",
6+
version="0.2.28",
77
url="https://github.com/epdevlab/elkoep-mqtt",
88
license="MIT",
99
author="Elko EP s.r.o.",

0 commit comments

Comments
 (0)