I am digging deeper into automation and templating. Sending simple messages with automation over Telegram is already working. From node-red I know, that you can easily use markdown and emoticons in the messages.
But with the following automation I got plain text instead of bold:
- alias: 'Telegram Commands'
hide_entity: true
trigger:
platform: event
event_type: telegram_command
action:
- service: notify.telegram
data_template:
message: >
{% if trigger.event.data.command == '/ping' %}
pong
{% else %}
**command not found**
{% endif %}
I tried to add the parse_mode: markdown
to the data_template but that causes an error. Also I tried to put the parse_mode directly to the telegram_bot service. That has no effect at all.
Second question: is there an easy way to integrate emoticons? Just copy them from telegram to the message (like in node-red) causes format errors because of special characters (I also red about this issue in other threads).