Ok, I think the Pilight integration is broken or extremely buggy… I solved it with the REST API and curl
switch:
- platform: command_line
switches:
kitchen_light:
command_on: '/usr/bin/curl -X PUT "http://192.168.1.12/send?protocol=elro_800_switch&on=1&systemcode=17&unitcode=2"'
command_off: '/usr/bin/curl -X PUT "http://192.168.1.12/send?protocol=elro_800_switch&off=1&systemcode=17&unitcode=2"'