Need some help creating a button for dimmers that shows %

Hi I’m trying to create a button that when pressed opens the more info page and reports the current brightness at the bottom. Currently, I am using the light button and it has a slider but the slider is kinda useless on a smaller screen. I assume to accomplish this I would have to create a switch template for this but I’m having trouble figuring out how to do this. I’m new to HA and not much of a coder so still learning the ropes. I know the basics and have created a few switch templates for changing icons for different states but I’m struggling with this one.

This is what I have now:


I’d like to get rid of the slider and set the tap action to open the more info page where it has a larger and easier to use slider. I’d then like the button itself to show the current brightness in % as a state.

As a side note is there any way to view the yaml code for the preloaded buttons? Might be helpful if I could view the default light button code.