I noticed that you had " retain: true " as a option. Retain should not be used for switches. It causes the issue you are seeing I believe.
Set the switches to " retain: false "
I’m not to sure about this part.
You may need to unset the retain flag for it to work properly.
I’m sorry the procedure on how to unset the flag escapes me.
EDIT: found the thread on how to unset the flag:
Hope its of help.