How can I update a receiver status when a switch is used? (COCO/KAKU, rfxcom based)

Hi,

I have several COCO (click-on-click-off) (wall) switchers and actors lights. The are switches directly bound/programmed to the actors. so that works like a default COCO installation without any HA.

Now I also own a RfxCom 433mhz transceiver so I have the codes from the Switches and I can control them with HA. Now I also programmed every actor with a (second) code so I can control them with HA without the need of any COCO switch or remote controller, so far so good.

But now I want to update the status of a Light in HA when I press a switch. I supposed that I can do this with a few lines of code in automation scripts? But is that the most common way? or can I use a template or event for it?
situation like this example:

configuration is available at Github: https://github.com/alco28/home-assistant-bluemotica
lights: https://github.com/alco28/home-assistant-bluemotica/blob/master/configuration/light.yaml
switches: https://github.com/alco28/home-assistant-bluemotica/blob/master/configuration/switch.yaml

Use the same code in HA instead of a second one for the rfxcom… ? The rfxcom picks up the signal when you press the switch and will update the state in HA?
Why use a different code when you control with the rfxcom?

well I get the codes in HA from the switches (transmitters) not the receivers, so I programmed a second code in the receivers (on the right in the image above) to control them manually because I have fever switches than receivers(1 switch controls multiple receivers like wall-plugs and sealing lights).

example: when I press the switch “Kaku handzender K1” all the actors with names that start with “keuken” (= kitchen) will go ON.