EchoWisky
(Erik Wachters)
May 8, 2019, 8:33am
1
Hi,
I upgraded my Hassbian to 0.92.2 and now I can’t send notifications any more to Telegram
In the log I see:
`2019-05-08 10:29:45 ERROR (Thread-19) [homeassistant.components.telegram_bot] Error sending message: Forbidden: bot was blocked by the user. Args: (766295943, '10:29 ALARM\nSabotage detectie uitgeschakeld.'), kwargs: {'parse_mode': 'HTML', 'reply_to_message_id': None, 'disable_web_page_preview': None, 'reply_markup': None, 'disable_notification': False, 'timeout': None}`
It says: “blocked by the user” but I don’t think anything changed.
I already tryed with a new token but the problem remains.
Any ideas?
thx
Erik
EchoWisky
(Erik Wachters)
May 9, 2019, 12:37pm
2
Hi,
For some reason it works again except for some notifications.
Log:
2019-05-09 09:16:52 ERROR (Thread-9) [homeassistant.components.telegram_bot] Error sending message: Can't parse entities: can't find end of the entity starting at byte offset 20. Args: (383126596, '9:16 Zone change\nnot_home to Delhaize.\nETE Home 0.'), kwargs: {'disable_web_page_preview': None, 'timeout': None, 'disable_notification': False, 'parse_mode': 'Markdown', 'reply_to_message_id': None, 'reply_markup': None}
2019-05-09 09:20:43 ERROR (Thread-15) [homeassistant.components.telegram_bot] Error sending message: Can't parse entities: can't find end of the entity starting at byte offset 32. Args: (383126596, '9:20 Zone change\nDelhaize to not_home.\nETE Home 0.'), kwargs: {'disable_web_page_preview': None, 'timeout': None, 'disable_notification': False, 'parse_mode':'Markdown', 'reply_to_message_id': None, 'reply_markup': None}
2019-05-09 09:21:18 ERROR (Thread-14) [homeassistant.components.telegram_bot] Error sending message: Can't parse entities: can't find end of the entity starting at byte offset 20. Args: (383126596, '9:21 Zone change\nnot_home to Delhaize.\nETE Home 0.'), kwargs: {'disable_web_page_preview': None, 'timeout': None, 'disable_notification': False, 'parse_mode': 'Markdown', 'reply_to_message_id': None, 'reply_markup': None}
Any ideas?
E.
michelde
(Michel Munzert)
July 1, 2019, 7:05pm
3
Did you figured out the problem?
EchoWisky
(Erik Wachters)
July 1, 2019, 7:07pm
4
if I recall correctly it was the “_” (underscore) that was the problem.
E.
2 Likes
michelde
(Michel Munzert)
July 1, 2019, 7:13pm
5
Thanks, it also solved my problem where I had an _ in the text.
inutilis
(Irakli)
July 4, 2020, 4:10pm
6
EchoWisky:
components.telegram_bot] Error sending message: Forbidden: bot was blocked by the user. Args: (766295943, '10:29 ALARM\nSabotage detectie uitgeschakeld.'), kwargs: {'parse_mode': 'HTML', 're
Thanks for the hint. I spent so much time and could not understand why message cannot be parsed until I read your post.
In my case it happened because I had included trigger entity id in message which contains underscores if consist of multiple words.
Solution was to change it to entity friendly name with whitespaces instead of underscores.
1 Like
pcroozen
(PatrickR)
January 22, 2023, 8:05pm
7
Same here. I didn’t understand why the message was correct in the error log but didn’t got send. I also had a few entities with underscores in their friendly names. Renamed those and now it works.
Thanks to you all for posting the solution a few years ago!
Hi. Same problem at jun 2023. Would like to ask…
could it be that your/my ‘message’ field (where you have the underscore that cause the problem), are not between quote marks?
I mean if you have:
message: Close blinds today at {{ states('sensor.day_of_the_week') }}
…and maybe you should have:
message: "Close blinds today {{ states('sensor.day_of_the_week') }}
"
…will the second pass without the error?. Haven’t tested yet, but it will be much more simple than having to rename the entity which have underscores. (As underscores used to be the usual syntax).
…just an idea.