Help using Pilight

Hi new to this but managed to get pilight and home assistant all in one install working on one pi3. The issue I’m having now is understanding how to link them correctly. I have home assistant switch working turning off and on the switch but when I use the rf remote it doesn’t update the switch in home assistant but does in pilight.

switch in pilight
“Switch1”: {
“protocol”: [ “kaku_switch” ],
“id”: [{
“id”: 15074578,
“unit”: 0
}],
“state”: “off”

and what I have in home assistant
switch:
platform: pilight
switches:
Bed light:
on_code:
protocol: kaku_switch
unit: 0
id: 15074578
‘on’: 1
off_code:
protocol: kaku_switch
unit: 0
id: 15074578
‘off’: 1
on_code_receive:
protocol: daycom
unit: 0
id: 15074578
state: ‘on’
off_code_receive:
protocol: daycom
unit: 0
id: 15074578
state: ‘off’

The update of the switch in home assitant relies on the on_code_receive and off_code_receive part.
With pilight you can use the command pilight-receive and when u use the remote it will show the values your receiver receives.
For my kaku switches i receive something like this:
{
“message”: {
“id”: 15074578,
“unit”: 0,
“state”: “on”
},
“origin”: “receiver”,
“protocol”: “arctech_switch”,
“uuid”: “0000-00-00-82-657755”,
“repeats”: 1
}

So i think you only need to change the protocol daycom to arctech_switch.
Restart HA and check if it is working. If it is not working we need to check the pulslen as described here.