Lovelace - Number pad entry, send number to service

Hi,

I have a lovelace view I am building. I want to be able to type a number using individual number buttons I have on the page (I so far have a button entity each for 0 through 9), and then for this number to be sent to a particular service when I press another button. The tricky bit is the number could be up to 6 digits long.

My current plan is to some how work out how to get each of the buttons to concatonate the button number that is pressed to a system wide variable. The “go” button will then iniaite a script and pass the current value of the variable to the script and in turn to the service (whilst also clearing the variable shortly after so it’s ready for next use)

Is there an easier way of doing this?

Anyone? I’m guessing it will need to be a custom card, I will have a go at doing it but not sure my coding skills are going to be up to the job!

you may be able to leverage the alarm control panel

You just won’t need all the alarm crap.

EDIT: When placed in Lovelace, it will have a number pad with an input field.

Cheers, this is very close to what I want to do but the numbers need to fill the entire space of the card. Whilst I could hack it apart I’m not really sure of the structure of js etc, but will have to try and work my way through it.