Just to point out sending the same command over and over has no effect on an entity. Turning a light on that is already on is basically ignored by HA.
There is also the filter node. This node requires the payload to change before it can pass again. Using turn_{{payload}}
in the call service and sending on
/off
from it’s respective trigger.
![image](https://community-assets.home-assistant.io/original/4X/8/1/d/81d9f7e45efc788932f906898a356876d59bb147.png)
[{"id":"ddccd19468a58f8c","type":"server-state-changed","z":"0f8b525850b0c871","name":"turn on, send on","server":"","version":5,"outputs":2,"exposeAsEntityConfig":"","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"50","ifStateType":"num","ifStateOperator":"lt","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"on","valueType":"str"}],"x":260,"y":1980,"wires":[["d38c1a5d8936f2b7"],[]]},{"id":"bd7ddb8a42eb8ee8","type":"server-state-changed","z":"0f8b525850b0c871","name":"turn off, send off","server":"","version":5,"outputs":2,"exposeAsEntityConfig":"","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"50","ifStateType":"num","ifStateOperator":"gte","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"off","valueType":"str"}],"x":260,"y":2080,"wires":[["d38c1a5d8936f2b7"],[]]},{"id":"d38c1a5d8936f2b7","type":"rbe","z":"0f8b525850b0c871","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":490,"y":2020,"wires":[["8a0675a6337d58ce"]]},{"id":"8a0675a6337d58ce","type":"api-call-service","z":"0f8b525850b0c871","name":"turn_{{payload}}","server":"","version":5,"debugenabled":false,"domain":"light","service":"turn_{{payload}}","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":2020,"wires":[[]]}]