When you activated the home-assistant pilight hub then all received RF codes will be put onto the event bus. Thus you can create an event trigger as it is mentioned in the manual.
For example:
automation: trigger: platform: event event_type: pilight_received event_data: protocol: daycom
unit: 6
This example should be in the pilight hub manual.