A plugin works in the panel edit page but doesn't work in the dashboard page

hello everyone,
i’m using this MQTT plugin that allows to communicate with a mqtt server to control a switch. I have a problem with the switch plugin. I have set the configurations and tested it in the edit panel page and it worked well.

but when I get out to the dashboard page and test there, it doesn’t work.

where is the problem ?!!

Any errors in the console in your browser? Or can you see if there are any problems with the websocket connections in the network tab of your browser?