esp32 smart home remote controller

hello, everyone. I am new to this world of home assistant. For some time now I have done several small projects at home. using esp32 a lot, right now I would like a little help for a project I have in mind. My house is controlled entirely by Home Assistant, all the lights in the house are Zigbee, so through Google or through certain smart buttons I control everything without a problem. But now I would like to make my own smart remote control using an ESP32 board. At this point I made the board through physical buttons that can control a room without a problem, the board has 4 buttons attached to it that can be use with one or two presses. I can control each light individually. But I would not like to make a remote control for each room. I would like to know if there is a way to add another buttons that allows me to change the room I want to control, but I really don’t know how to create this code.
In short, a remote control that has 4 colored buttons each to select the room you want to control and 4 more buttons to control the different devices in the room.