Closed toedtnissen closed 2 years ago
mqttClient.publish("test/status", pinState == LOW ? "ON" : "OFF");
mqttClient.subscribe("test/action");
You are right, on that leading slash is not required in topic names. But it does not harm either.
I personally use it that way, e.g.:
mqttClient.publish("test/status", pinState == LOW ? "ON" : "OFF");
mqttClient.subscribe("test/action");