This commit is contained in:
parent
a06e94147a
commit
5d4b3cfe60
@ -49,12 +49,15 @@ def timer_tick(*args) -> None:
|
||||
def mqtt_on_connect(client, userdata, flags, rc):
|
||||
BirbnetesIoTPlatformStatusDriver.enqueue_pattern('green', [1])
|
||||
client.subscribe(f"command/{config.DEVICE_ID}")
|
||||
logging.error("MQTT Connected!")
|
||||
logging.info("MQTT Connected!")
|
||||
|
||||
|
||||
def mqtt_on_disconnect(client, userdata, rc):
|
||||
if rc != 0:
|
||||
logging.error(f"Unexpected MQTT Disconnect. RC: {rc}")
|
||||
BirbnetesIoTPlatformStatusDriver.enqueue_pattern('red', [1])
|
||||
logging.error("Unexpected MQTT Disconnect")
|
||||
else:
|
||||
logging.debug("MQTT Disconnected")
|
||||
|
||||
|
||||
def mqtt_on_command(client, userdata, message):
|
||||
|
Loading…
Reference in New Issue
Block a user