Event:State or Trigger:State nodes - want to read the output from a switch even though it's already in current state

Hi,
Still new to HA and NR.
Trying migrate a function from my old (not so reliable nor flexible controller) to HA and it was more difficult than I thought.

I still have a bunch of 433MHz devices and they are not always that reliable, so sometimes I want or need to send on even though HA think the device is already on.

BUT, I hit a problem immediately:
I have tried both Event:State and Trigger:State nodes and connected them directly to a debug node.
But I can’t get an msg.payload = on if the switch is already on…

image
I un-ticked the “Ignore state change even when” “Current state equals previous state” in the Event:State node:


If I send On-Off-On, I can see on, off, on from the debug.
But if I send On-On-On, I can only se one “on” in the debug and only if the switch was previously off.

Same with Trigger:State node (but no exception for previous state)

Is it something fundamental I have missed, or how to do?

I suggest you handle it differently.

Set NodeRed up to send the RF Signal to set the device on and then set NodeRed to set the switch or whatever entity you are using to on afterwards.
Now HA do not have a direct relation between the entity and the physical device.

This also makes it possible to have NodeRed listen for RF signals from a RF remote and react to that, so the entity can be updated that way too.

Long response time here…
How do you mean now? Hor do I send or listen to an RF Signal in NR?

Edit-Add: I also have 2-3 old 433MHz in-wall relay switches that can be operated by the wall switch, but if so, the controller does not get the information that I have been there and switched the light on/off manually.
So, if light is Off and I think it’s a bit to dark and hit the wall switch to turn it On, the controller think it’s still Off. When it gets lighter and my NR flow is supposed to switch that lamp off, the controller think it’s already Off and does not send a signal…Is there some work-around for this?

Edit-Add2: Actually, that will cause me a real problem. It’s not too easy to change those wall switches either. I have a complementary radio switch to control them and that goes directly.
I have another solution in some other locations where I have a Z-Wave wall switch with no load and direct association to a wall plug. I that case the controller always know what state it is in.
But that requires 230V for the wall switch and I don’ have that where those radio switches are.

If teh controller have better coverage for those radio switches than the actual wall switches, I might be able to swap them for Z-Wave (only budget restrictions in the way…).
In that case I could probably regard the radio switch as some kind of remote and have a rule that sends what the remote sends to the Z-Wave devices. On-On, Off-Off.

But for the time beeing, the problem with the non reporting manual wall switch for these is a real head ake.
I also have a buch of 433 wall plugs left that is used for a few things (garden and some X-mas lights) and I have remote controls for them that might not reach the HA RFXtrx…

So help with both how to “listen/send RF” and how to incorporate that with my NR Flows and how to handle non reporting manual switches for 433 is highly appreciated!

Here are some example use cases:

What you need:

  • HA Light template
  • A script to send the RF code to turn off
  • A script to send the RF code to turn on
  • An automation that captures the RF code for turn on
  • An automation that captures the RF code for turn off

My HA light template look like this:


light rf_devices:
  - platform: template
    lights:
      lava_lamp:
        friendly_name: "Lava Lamp"
        turn_on:
          service: script.lava_lamp_turn_on
        turn_off:
          service: script.lava_lamp_turn_off

The lava_lamp_turn_on and lava_lamp_turn_off scripts just send the RF codes to those actions no more.
Then I have an automation (mine is in NR, but it could also be in HA) that listen for the turn_on and turn_off signals and just call the appropriate light service calls in HA to turn on or turn off.

If you press a button in HA to turn on the lights, then the script is run, the scripts send the RF code and the automation capture the RF code and set the light to on and the the RF device also receive the RF signal and turns on.
If you press the on button on the remote instead, then the RF signal is send from that, the automation captures the RF code and set the light to on and the RF device receive the RF signal and turns on.
If for some reason the RF device does not receive the RF signal, which is really not an issue with HA, but then in HA you can just click the button and it will set the correct state or you can just click a button on the remote to set the correct state again. The remote can often click the on button even though the RF device is already on, so the RF device does nothing, but HA corrects it state, if it is wrong, because the automation is not a toggle, but a service call to a specific state.

If the in-wall switch does not emit any signal in RF or otherwise, then the is no way to detect it, beside setting up your own sensor, like a LUX sensor near the light or better yet a energy measuring switch on the device the wall switch operate.
Only way around it without extra sensors is to just have NR send the service call to set the device in a specific state without regards to its current state.

Here is my NR automation to capture RF codes from remotes.

[{"id":"c653136f.dfffc8","type":"api-call-service","z":"75464936.35888","name":"Outdoor_light_strip_toogle","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"switch","service":"toggle","areaId":[],"deviceId":[],"entityId":["switch.outdoor_light_strip"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":870,"y":615,"wires":[[]]},{"id":"048735cb8d988652","type":"api-call-service","z":"75464936.35888","name":"Bed Lamp Window","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_lamp_window_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":840,"y":405,"wires":[[]]},{"id":"361d47109781e192","type":"api-call-service","z":"75464936.35888","name":"Bed Spot Window","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_spot_window_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":840,"y":435,"wires":[[]]},{"id":"c94e5ffaba474e68","type":"api-call-service","z":"75464936.35888","name":"Bed Spot Wall","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_spot_wall_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":830,"y":465,"wires":[[]]},{"id":"0f230e263a29118c","type":"api-call-service","z":"75464936.35888","name":"Bed Lamp Wall","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_lamp_wall_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":830,"y":495,"wires":[[]]},{"id":"56aed042fdca012a","type":"api-call-service","z":"75464936.35888","name":"Bedroom Cabinet Spots","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bedroom_cabinet_spots_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":525,"wires":[[]]},{"id":"3be6297003da7822","type":"api-call-service","z":"75464936.35888","name":"Bedroom Off","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":["sovevaerelse"],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":555,"wires":[[]]},{"id":"700dd972c7c6c4c2","type":"api-call-service","z":"75464936.35888","name":"Bedroom Off","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":["sovevaerelse"],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":855,"wires":[[]]},{"id":"821c7a739621d319","type":"api-call-service","z":"75464936.35888","name":"Bedroom Cabinet Spots","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bedroom_cabinet_spots_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":825,"wires":[[]]},{"id":"4674a6db961a02a8","type":"api-call-service","z":"75464936.35888","name":"Bed Lamp Wall","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_lamp_wall_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":830,"y":795,"wires":[[]]},{"id":"1b81b3a3434e9aab","type":"api-call-service","z":"75464936.35888","name":"Bed Spot Wall","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_spot_wall_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":830,"y":765,"wires":[[]]},{"id":"1232c95134b1ac96","type":"api-call-service","z":"75464936.35888","name":"Bed Spot Window","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_spot_window_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":840,"y":735,"wires":[[]]},{"id":"a7f8bdfbfec2daf0","type":"api-call-service","z":"75464936.35888","name":"Bed Lamp Window","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_lamp_window_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":840,"y":705,"wires":[[]]},{"id":"5be243b22579972f","type":"server-events","z":"75464936.35888","name":"Catch RF codes","server":"541ade28.b4a62","version":2,"eventType":"esphome.rf_code_received","exposeToHomeAssistant":false,"eventData":"","haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"}],"event_type":"","x":110,"y":360,"wires":[["084697be500b2b0c"]]},{"id":"8e392114e00433f1","type":"switch","z":"75464936.35888","name":"split by button","property":"$substring(payload.event.code,-1,1)","propertyType":"jsonata","rules":[{"t":"eq","v":"8","vt":"str"},{"t":"eq","v":"c","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"9","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"3","vt":"str"}],"checkall":"false","repair":false,"outputs":8,"x":620,"y":510,"wires":[["048735cb8d988652"],["361d47109781e192"],["c94e5ffaba474e68"],["0f230e263a29118c"],["56aed042fdca012a"],["3be6297003da7822"],[],["c653136f.dfffc8"]]},{"id":"01018699ab50ae9b","type":"switch","z":"75464936.35888","name":"split by button","property":"$substring(payload.event.code,-1,1)","propertyType":"jsonata","rules":[{"t":"eq","v":"8","vt":"str"},{"t":"eq","v":"c","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"9","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"3","vt":"str"}],"checkall":"false","repair":false,"outputs":8,"x":605,"y":810,"wires":[["a7f8bdfbfec2daf0"],["1232c95134b1ac96"],["1b81b3a3434e9aab"],["4674a6db961a02a8"],["821c7a739621d319"],["700dd972c7c6c4c2"],[],["adb20a1.6c93f78"]]},{"id":"084697be500b2b0c","type":"switch","z":"75464936.35888","name":"Split by receiver id","property":"payload.event.device_id","propertyType":"msg","rules":[{"t":"eq","v":"b8c602623079b5886c3811a9718983e4","vt":"str"},{"t":"eq","v":"3a50d2409016ea5241c71fbd832c9a26","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":300,"y":360,"wires":[["0b066424bf7cfe22"],["3852968a1c53f033"]],"outputLabels":["Living room receiver","Bedroom receiver"]},{"id":"0b066424bf7cfe22","type":"switch","z":"75464936.35888","name":"Split by remote id","property":"payload.event.code","propertyType":"msg","rules":[{"t":"cont","v":"0051","vt":"str"}],"checkall":"false","repair":false,"outputs":1,"x":300,"y":195,"wires":[["a29bd65e0b9892ce"]]},{"id":"a29bd65e0b9892ce","type":"switch","z":"75464936.35888","name":"split by button","property":"$substring(payload.event.code,-4,4)","propertyType":"jsonata","rules":[{"t":"eq","v":"4551","vt":"str"},{"t":"eq","v":"4554","vt":"str"},{"t":"eq","v":"5151","vt":"str"},{"t":"eq","v":"5154","vt":"str"},{"t":"eq","v":"5451","vt":"str"},{"t":"eq","v":"5454","vt":"str"},{"t":"eq","v":"5511","vt":"str"},{"t":"eq","v":"5514","vt":"str"}],"checkall":"false","repair":false,"outputs":8,"x":620,"y":195,"wires":[["84321af00eb5c7aa"],["f89f71e43176a995"],["88975914354c2840"],["5057a5b9d0bbefb4"],[],[],[],[]],"outputLabels":["A on","A off","B on","B off","C on","C off","D on","D off"]},{"id":"84321af00eb5c7aa","type":"api-call-service","z":"75464936.35888","name":"Set lava lamp status to on","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.lava_lamp"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":105,"wires":[[]]},{"id":"f89f71e43176a995","type":"api-call-service","z":"75464936.35888","name":"Set lava lamp status to off","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.lava_lamp"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":135,"wires":[[]]},{"id":"88975914354c2840","type":"api-call-service","z":"75464936.35888","name":"Set tesla coil status to on","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.tesla_coil"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":165,"wires":[[]]},{"id":"5057a5b9d0bbefb4","type":"api-call-service","z":"75464936.35888","name":"Set tesla coil status to off","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.tesla_coil"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":195,"wires":[[]]},{"id":"adb20a1.6c93f78","type":"api-call-service","z":"75464936.35888","name":"Outdoor_light_strip_toogle","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"switch","service":"toggle","areaId":[],"deviceId":[],"entityId":["switch.outdoor_light_strip"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":870,"y":915,"wires":[[]]},{"id":"5db0825bf0160462","type":"api-call-service","z":"75464936.35888","name":"Bed Lamp Window","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_lamp_window_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":825,"y":1005,"wires":[[]]},{"id":"9af8d6381ca40e88","type":"api-call-service","z":"75464936.35888","name":"Bed Spot Window","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_spot_window_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":825,"y":1035,"wires":[[]]},{"id":"e146a40eb00eb4b1","type":"api-call-service","z":"75464936.35888","name":"Bed Spot Wall","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_spot_wall_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":815,"y":1065,"wires":[[]]},{"id":"d82cd3b65cab7cb1","type":"api-call-service","z":"75464936.35888","name":"Bed Lamp Wall","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_lamp_wall_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":815,"y":1095,"wires":[[]]},{"id":"b3ceeeed2169ec9d","type":"api-call-service","z":"75464936.35888","name":"Bedroom Cabinet Spots","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bedroom_cabinet_spots_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":845,"y":1125,"wires":[[]]},{"id":"dba6e9a180025bd1","type":"api-call-service","z":"75464936.35888","name":"Bedroom Off","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":["sovevaerelse"],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":805,"y":1155,"wires":[[]]},{"id":"8c43e1ad7aa004d0","type":"switch","z":"75464936.35888","name":"split by button","property":"$substring(payload.event.code,-1,1)","propertyType":"jsonata","rules":[{"t":"eq","v":"8","vt":"str"},{"t":"eq","v":"c","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"9","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"3","vt":"str"}],"checkall":"false","repair":false,"outputs":8,"x":605,"y":1110,"wires":[["5db0825bf0160462"],["9af8d6381ca40e88"],["e146a40eb00eb4b1"],["d82cd3b65cab7cb1"],["b3ceeeed2169ec9d"],["dba6e9a180025bd1"],[],["cc766891.585dd"]]},{"id":"e10329224554e7d4","type":"switch","z":"75464936.35888","name":"split by button","property":"$substring(payload.event.code,-1,1)","propertyType":"jsonata","rules":[{"t":"eq","v":"8","vt":"str"},{"t":"eq","v":"c","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"9","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"3","vt":"str"}],"checkall":"false","repair":false,"outputs":8,"x":605,"y":1410,"wires":[["b2dca448558c0aa0"],["0b78590ddd274b3e"],["dcda5a32b70c427e"],["8b0e9a575d6d092e"],["7853feb9eef83a4a"],["c09cdf146d162946"],[],["144f01bf7a6c3bdc"]]},{"id":"b2dca448558c0aa0","type":"api-call-service","z":"75464936.35888","name":"Bed Lamp Window","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_lamp_window_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":840,"y":1305,"wires":[[]]},{"id":"0b78590ddd274b3e","type":"api-call-service","z":"75464936.35888","name":"Bed Spot Window","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_spot_window_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":840,"y":1335,"wires":[[]]},{"id":"dcda5a32b70c427e","type":"api-call-service","z":"75464936.35888","name":"Bed Spot Wall","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_spot_wall_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":830,"y":1365,"wires":[[]]},{"id":"8b0e9a575d6d092e","type":"api-call-service","z":"75464936.35888","name":"Bed Lamp Wall","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bed_lamp_wall_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":830,"y":1395,"wires":[[]]},{"id":"7853feb9eef83a4a","type":"api-call-service","z":"75464936.35888","name":"Bedroom Cabinet Spots","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"toggle","areaId":[],"deviceId":[],"entityId":["light.bedroom_cabinet_spots_relay"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":1425,"wires":[[]]},{"id":"c09cdf146d162946","type":"api-call-service","z":"75464936.35888","name":"Bedroom Off","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":["sovevaerelse"],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":1455,"wires":[[]]},{"id":"144f01bf7a6c3bdc","type":"api-call-service","z":"75464936.35888","name":"Outdoor_light_strip_toogle","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"switch","service":"toggle","areaId":[],"deviceId":[],"entityId":["switch.outdoor_light_strip"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":870,"y":1515,"wires":[[]]},{"id":"541ade28.b4a62","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

The 4 remotes with the same receiver id are Sonoff RF remotes. You might not need less splits if your remotes are all different ones.

And this is my YAML code to send a RF code from a HA script.
service: esphome.rfbridge1_send_rf_code
data:
sync: 10000
low: 280
high: 900
code: 5326164

Just woke up this morning and will read all you wrote, but will need to go through it again in detail.

But if I can have NR to send a “service call to set the device in a specific state without regards to its current state”, isn’t that the solution to all my problems?
If I have NR to do that in parallel with “call for service”, it would correct for any missed signals or when I have “fooled” the system by hitting non-reporting wall switches?
I don’t care too much if a dashboard show incorrect state for a while as long as NR flows sets the devices into correct states when it should.

I need to import your NR automation for capturing RF codes from remotes and see if I understand later.
I hope it’s not too complicated…
I think I copied some info from the RFXtrx… maybe the codes i need are in there… don’t remember…

Then I need to learn how to send such “service calls” from NR. I guess that’s another node than “call for service” (on my phone now and NR isn’t that easy to browse on small touchscreens without messing things up…)

At least it looks like you have the solution for this problem as well and I just need to understand and learn!
Thanks for helping me out!

quick glance into NR from the computer.
Can’t see any node with name “service” in it apart from “Call for Service”.
I don’t understand how (and if possible) to get NR to send the RF-code (on/off) to set a device without regards to current state? If it works, I might just need to capture on/off codes for 6-8 devices and send them in parallel?

What RF device do you have to capture and transmit RF signals?
I have an old Sonoff RF Bridge 433 (The black one)
The old Sonoff RF Bridge 433 can be flashed with ESPHome and the RF chip with Portisch, which makes it possible to catch lots of different 433Mhz RF signals and just report some numbers on the HA event bus that can be copied and retransmitted.
The newer (white) Sonoff RF Bridge R2 can, AFAIK, not have its RF chip patched with Portisch, which limits its ability to catch codes, but if that limitation affect you RF signals is hard to say.

ups… sounds complicated
I have the RFXtrx

Well, you follow some good guides and that is it, but the Sonoff RF Bridge cost around 15€, so it is a cheaper option.
The device you have can both capture and transmit codes, so it should be possible, but I have no idea how it works. Someone else have to help you there.

I think I have to work around it for now and maybe try to find budget to swap out some more old hardware to something that reports status back to controller. Probably better in a longer perspective even though I have already gone over my planned budget for jumping over to a more modern and flexible control system…

Plan to keep 433 for sensors as long as the ones I have lives. They are cheap, batteries lasts for years and so far they have been very robust. But for switches 433 feels a bit outdated.