It works, but I want to make the buttons “prettier” using custom labels.
So I read some example suggesting something like this
commands.push({"text": "Turn on lights", "callback_data": "/lights_on"});
But this doesn’t work: when I press the button the content of the text variable is actually sent, instead of callback_data.
Is there a way to accomplish this? Secondly, it would be possible to display an icon instead of plain text?
Hmm… your code is not working: maybe there’s a typo?
Can you post the full snippet?
Anyway, I don’t want to render an inline keyboard but the “sticky” one, as in this screenshot:
Ah sorry, you want to use the normal keyboard.
AFAIK it is not possible to change the callback data from the text showing in the normal keyboard. Normal keyboard is used to send commands or messages to the bot, and it is not interactive like the inline keyboards.
What integration for Telegram are you using?
I am using the Homeassistant Telegram Bot and simply call it via NodeRed.