Switch Entity cannot be set

I’m creating switch entity using Entity node.
But I cannot set its state using input payload. It works for other type of entities ie binary_sensor. But not for switch.
Regardless what I send to the switch (string: on, boolean: true) it doesn’t work. The result is red square icon:
obrazek

In addition, when I select switch, all options related to merging incoming payload disappears. Is it something expected?
NR: 7.2.10

vs

As far as I know you can only create sensors and binary_sensors on the fly.

The node allows to create switch too. it is one of available options. And indeed it creates it. but somehow I cannot change its state from NR. It works however from Lovelace.

I updated HA websocket, NR itself - neither of those help.
Maybe except, that now, message sent to switch node exits using second output (in prev version of websockets NR plugin, it was existing from the first output)

I try to feed that with booleans, numeric (0/1), string (on/off). It remains not working. HA creates switch but cannot update its state :frowning:

You can’t set the state of a switch-type entity node that way. But there’s a feature request for that.

Here’s an alternative for you.

[{"id":"4b4d8891.7aae78","type":"ha-entity","z":"d0505e55.8a4b8","name":"mytest","server":"2ba225ad.e7deea","version":1,"debugenabled":false,"outputs":2,"entityType":"switch","config":[{"property":"name","value":"mytest"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":320,"y":450,"wires":[[],[]]},{"id":"cfd84000.c8995","type":"api-call-service","z":"d0505e55.8a4b8","name":"","version":1,"debugenabled":false,"service_domain":"switch","service":"","entityId":"switch.mytest","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":340,"y":530,"wires":[[]]},{"id":"dc00ee7d.29712","type":"inject","z":"d0505e55.8a4b8","name":"on","props":[{"p":"payload.service","v":"turn_on","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":200,"y":510,"wires":[["cfd84000.c8995"]]},{"id":"8755414.452c5c","type":"inject","z":"d0505e55.8a4b8","name":"off","props":[{"p":"payload.service","v":"turn_off","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":200,"y":550,"wires":[["cfd84000.c8995"]]}]

Thank you @mbonani to pointing me to the opened already issue. For me it should be treated as bug instead of feature request. But I hope one day it will be resolved anyway.

Your alternative makes sense. And it works. Thank you for this idea too.