How can I add a button to a custom component?

I’m trying to REST enable my air purifier which currently uses a single button to cycle through fan modes and another button to activate/deactivate the plasma generator. I don’t believe I can just extend a switch configuration since it can have multiple states.

I was able to follow the Basic State Setting Example in the cookbook to add a new component with a text label successfully. However, I’ll need buttons to control the fan speed and to toggle the plasma generator.

What is required to add a custom button? I would also like to add a second line to include more information. Do I need to do more than just set a state?

you can add a button using ButtonEntity. (replied a thread from 2016 :slight_smile: )