Esp + mqtt + rule

Hi There,

I have some ESP Wall switches and configured some rules. But want activate them using MQTT
Now I have some shell_commands to do this:

meek_fan_turn_off: 'curl,FanOff'
meek_fan_turn_on: 'curl,FanOn'

Is it possible to change this into a MQTT Action?

The rule in ESP:

on FanOn do
     TaskValueSet 6,4,0

on FanOff do
     TaskValueSet 6,4,1

If it is possible to turn Tast 6,4 from 0 to 1 and vs using MQTT also than I can remove the rule in ESP

ESP info

Name of ESP Easy Mega: MeekWC