I never got to this thread when you initially asked @adam, so apologies there. We do have a known issue at the moment with MQTT actuators losing value on browser refresh, but I’m not aware of any such issue with MQTT display widgets (like the 2-state widget in question here). Other than perhaps on a very quick refresh the widget showing the wrong state, but this should be resolved on a subsequent refresh unless both are performed very quickly.
@francesco_talotta, was your widget a 2-state or an actuator like a Button widget? I know you mentioned a 2-state above, but I wanted to be sure. If it really is a 2-state widget, I’d be interested in the MQTT code you’re using to pass it a 0 or 1, this might help uncover why it’s not behaving as you’re expecting.