There was an error while loading. Please reload this page.
1 parent f6712fb commit 35cdfd3Copy full SHA for 35cdfd3
1 file changed
qtoggleserver/zigbee2mqtt/client.py
@@ -116,6 +116,7 @@ def __init__(
116
async def _client_loop(self) -> None:
117
while True:
118
try:
119
+ self.set_online(False)
120
async with aiomqtt.Client(
121
hostname=self.mqtt_server,
122
port=self.mqtt_port,
@@ -129,6 +130,7 @@ async def _client_loop(self) -> None:
129
130
) as client:
131
self._mqtt_client = client
132
await client.subscribe(f"{self.mqtt_base_topic}/#")
133
+ self.set_online(True)
134
async for message in client.messages:
135
136
await self.handle_mqtt_message(str(message.topic), message.payload)
0 commit comments