I'd like to perform an action on the condition that ESPeasy is connected to my MQTT broker. In the examples there's an on..do statement for this, but is there a way to use this in an If statement?
So instead of:
Code: Select all
on MQTT#Connected do
Publish,%sysname%/status,First message!
endon
Code: Select all
on mcp#17 do // PA0 pin change
if MQTT#Connected
Publish,%sysname%/status,First message!
endif
endon