How to connect widget and MQTT


I was looking how to connect my MQTT broker with homegenie. I connect it. But i don’t know and I didn’t find any example to make a widget like a switch widget that will publish topic to my MQTT broker that is my light turned off or on. Can anyone help me or give me an advice how to do that?

Many thanks and kind regards,

Its something I have done, but I dont think i’ve committed the later version of this repo… but some info in here: