Complete the code to set the Last Will and Testament (LWT) topic in an MQTT client.
client.will_set(topic=[1], payload="Offline", qos=1, retain=False)
The LWT topic is usually a status topic like "home/status" to notify others if the client disconnects unexpectedly.
Complete the code to set the LWT payload message indicating the client is offline.
client.will_set(topic="home/status", payload=[1], qos=1, retain=False)
The LWT payload should indicate the client is offline when it disconnects unexpectedly.
Fix the error in the code to correctly set the LWT with retain flag.
client.will_set(topic="home/status", payload="Offline", qos=1, retain=[1])
The retain flag must be a boolean True or False, not a string or integer.
Fill both blanks to create a dictionary for LWT settings with topic and payload.
lwt_settings = {"topic": [1], "payload": [2]The LWT dictionary should have the topic as "home/status" and payload as "Offline" to notify disconnection.
Fill all three blanks to set LWT with topic, payload, and QoS level.
client.will_set(topic=[1], payload=[2], qos=[3], retain=True)
The LWT should use the status topic, offline payload, and QoS level 1 for reliable delivery.