Im using the same logic with several virtual switches in Smartthings. Works like a charm. Please find below one NodeRed Flow Example.
[{"id":"317a2973.8db416","type":"api-call-service","z":"45f89900.2e2b58","name":"","server":"2fba4297.e4145e","version":1,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.abkuhlen","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":680,"y":400,"wires":[[]]},{"id":"e983c8a0.87fe98","type":"api-call-service","z":"45f89900.2e2b58","name":"","server":"2fba4297.e4145e","version":1,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.abkuhlen","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":680,"y":460,"wires":[[]]},{"id":"1f5d4790.2a36e8","type":"switch","z":"45f89900.2e2b58","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":400,"wires":[["317a2973.8db416"],["e983c8a0.87fe98"]]},{"id":"ca60c679.b203a8","type":"server-state-changed","z":"45f89900.2e2b58","name":"Abkühlen On?","server":"2fba4297.e4145e","version":"1","entityidfilter":"input_boolean.abkuhlen","entityidfiltertype":"substring","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"x":90,"y":520,"wires":[["466f9d27.5e7d54"]]},{"id":"466f9d27.5e7d54","type":"switch","z":"45f89900.2e2b58","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"On","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":520,"wires":[["536e82fa.78200c"],["d75ad5b9.a4cec8"]]},{"id":"c86312c7.e5a92","type":"server-state-changed","z":"45f89900.2e2b58","name":"ST Dyson Wohnzimmer","server":"2fba4297.e4145e","version":1,"entityidfilter":"switch.dyson_wohnzimmer","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":120,"y":400,"wires":[["1f5d4790.2a36e8"]]},{"id":"536e82fa.78200c","type":"api-call-service","z":"45f89900.2e2b58","name":"","server":"2fba4297.e4145e","version":"1","service_domain":"switch","service":"turn_on","entityId":"switch.dyson_wohnzimmer","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":650,"y":520,"wires":[[]]},{"id":"d75ad5b9.a4cec8","type":"api-call-service","z":"45f89900.2e2b58","name":"","server":"2fba4297.e4145e","version":"1","service_domain":"switch","service":"turn_off","entityId":"switch.dyson_wohnzimmer","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":650,"y":580,"wires":[[]]},{"id":"2fba4297.e4145e","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]
I have found for on/off there is no loop. However, for mirroring things like brightness or volume there can be some issues. I employed a message filter and a function check to only allow values that differ from previous values in this case