I am fairly new to home assistant and migrate my old self made smart home implementation to home assistant.
Everything works fine but I am stuck now.
To control my lights I am using cheap 433MHz RCs from amazon. These RCs are really dumb but sufficient for me. To get them into my old smart home software I have used the Sonoff RF Bridge with Tasmota to get MQTT messages, when the button on the RC is pressed.
Glad it worked. If you are on the page where you setup the automation tap the 3 vertical dots in top right corner and select edit in yaml and you could have put them in there.