Telegram can't send unicode anymore

Since the upgrade from HA 0.82.1 to HA 0.83.2 I have noticed that Telegram messages with a Unicode in it are not being sent anymore. I use this method to send emoticons.

This is the part of the automation that was always working before. Anyone know how to make this working again? I already tried to change the quoting of the unicode, but that give me other errors.

  - service: notify.telegram
      title: "{{ '\uD83D\uDE98' }}"
      message: |
          a-h: {{ states.sensor.google_maps_amf2home.state }}
          d-h: {{ states.sensor.google_maps_dh2home.state }}

Error message in the log

Error executing service <ServiceCall telegram_bot.send_message (c:51c0881692c149088abf9488b8e2df49): target=[-179900310], title=<homeassistant.helpers.template.Template object at 0x7f9f67892390>, message=<homeassistant.helpers.template.Template object at 0x7f9f6852aa90>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/", line 1177, in _event_to_service_call
    await service_handler.func(service_call)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/telegram_bot/", line 275, in async_send_telegram_message
    partial(notify_service.send_message, **kwargs))
  File "/usr/local/lib/python3.6/concurrent/futures/", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/telegram_bot/", line 469, in send_message
    chat_id, text, **params)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/telegram_bot/", line 445, in _send_msg
    out = func_send(*args_msg, **kwargs_msg)
  File "/usr/local/lib/python3.6/site-packages/telegram/", line 65, in decorator
    result = func(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/telegram/", line 90, in decorator
    result =, data, timeout=kwargs.get('timeout'))
  File "/usr/local/lib/python3.6/site-packages/telegram/utils/", line 308, in post
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 0-1: surrogates not allowed

Upgraded to 0.83.3 but the issue is still there. This has always worked in previous HA versions :confused:

Solved by @sagatxxx in this topic.

I am now using this site to get the proper encoding to use in Python. The Java code I was using before did work on HA version 0.82 and earlier.