Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade python-telegram-bot to 6.0.1 #7704

merged 1 commit into from May 22, 2017


None yet
4 participants
Copy link

fabaff commented May 22, 2017


  • Add support for User.language_code
  • Fix Message.text_html and Message.text_markdown for messages with emoji


Tested with the following configuration:

  platform: polling
  api_key: !secret telegram_api
    - !secret telegram_client

  - platform: telegram
    name: telegram
    chat_id: !secret telegram_client

Message sent with "Call Service"

{"message": "The sun is {% if is_state('sun.sun', 'above_horizon') %}up{% else %}down{% endif %}!"}

This comment has been minimized.

Copy link

mention-bot commented May 22, 2017

@fabaff, thanks for your PR! By analyzing the history of the files in this pull request, we identified @azogue, @sander76 and @balloob to be potential reviewers.

Copy link

azogue left a comment

Could I propose a minimal correction when rendering template attributes:

in the _render_template_attr at line 221:

if attribute_templ:
    if not isinstance(attribute_templ, str):
        attribute_templ.hass = hass
        data[attribute] = attribute_templ.async_render()
        data[attribute] = attribute_templ

When messages come from the notify.telegram platform, they come rendered, so it's failing here with an AttributeError.

This change fixes #7705


This comment has been minimized.

Copy link

azogue commented May 22, 2017


Also, when testing the changes with the webhooksplatform, I have suffered a pair of TimeOut errors in the setup, when calling to bot.setWebhook. Maybe we should pass a timeout of 10s to be generous there...

On the other hand, I have not encountered any more problems with the new version. With some time I will try to explore the new features of the API.


This comment has been minimized.

Copy link
Member Author

fabaff commented May 22, 2017

Your proposed changes for the template rendering are included in #7709.

I don't use webhooks but timeouts are always good to avoid open connections which are waiting for the server.


azogue approved these changes May 22, 2017

@fabaff fabaff merged commit 47355ee into home-assistant:dev May 22, 2017

4 checks passed

cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage remained the same at 93.616%
hound No violations found. Woof!

@fabaff fabaff deleted the fabaff:upgrade-python-telegram-bot branch May 22, 2017

@balloob balloob referenced this pull request Jun 2, 2017


0.46 #7866

@home-assistant home-assistant locked and limited conversation to collaborators Sep 4, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.