I have enabled the Telegram integration in HomeAssistant and can send notifications.
I found that the telegram bot has a “Delete message” service. But it needs a message ID, and it is not clear to me where I can get that for a message that I sent earlier. Same with “Edit message”.
Does the “Send message” service perhaps return a generated ID? How would I get and store that?
Apparently it is the last message of the bot. That’s close enough for my purposes because currently I only use the bot for one single notification. But should I ever need it for more than one, then last will not be sufficient anymore.
Did you get to that point?
Does anyone know of another option like “last” for multiple messages? Or something like “everything sent in the last 24h”.
I think of a clean-up routine to keep the bot-chat empty, but the first message needs to stay, so I cant delete the whole chat every day.