Here you can see the script that will control the shelly device via MQTT with its topic configurations: Topic Write Topic: shellies/shellyswitch25-/roller/0/command/pos Script: return payload*100.0; Topic Event Topic: shellies/shellyswitch25-/roller/0/command/pos Script: if(payload == -1){ return 0; }else{ return payload/100.0; }