Aws mqtt publish NULL value


#1

How can I publish a MQTT null value?

thing.mqtt.publish("$aws/things/"+ thing_conf['thingname'] +"/shadow/update", json.dumps({"state": {"desired": NULL}})

To remove the AWS shadow “desired” values, I want to update it to NULL.


#2

Ok, never mind, found the solution :slight_smile:

Its: “None”

thing.mqtt.publish("$aws/things/"+ thing_conf[‘thingname’] +"/shadow/update", json.dumps({“state”: {“desired”: None}})