How to let esphone tell hass RF code

Can I use something like text sensor to get RF code in esphone

In addition. Can Hass send specific RF code through esphone.

It used to be a similar function implemented with openmqttgateway. Now I want to move everything to esphone. I don’t know how.

To view official documents:

It seems that it can only be done in esphone. Can’t give the RF code to the hass

Its esphome.

And I cannot see how to do what you seek. The functionality is to inform via a sensor when a particular button is pressed.

What is your use case?