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

Add mastodon #13441

merged 3 commits into from Mar 31, 2018

Add mastodon #13441

merged 3 commits into from Mar 31, 2018


Copy link

@fabaff fabaff commented Mar 24, 2018


This notification platform uses Mastodon to deliver messages.

Pull request in with documentation (if applicable): home-assistant/

Example entry for configuration.yaml (if applicable):

  - platform: mastodon
    name: mastodon
    access_token: !secret mastodon_access_token
    client_id: !secret mastodon_client_id
    client_secret: !secret mastodon_client_secret

Service data:

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


  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/
  • New files were added to .coveragerc.
Copy link

@tinloaf tinloaf left a comment

Looks good to me. I was just wondering whether it wouldn't be better to have a persistent object that is returned from get_service instead of creating a new one every time. This would cut down the amount of API calls by a factor of two, since it wouldn't re-login all the time.


Copy link
Member Author

@fabaff fabaff commented Mar 27, 2018

You are right. I will change that.


Copy link

@pvizeli pvizeli commented Mar 29, 2018

@fabaff before it was a lot better. So it fails if the auth data was wrong. Now it Return every time a object back also if the auth is wrong


This reverts commit 2c8446f.
@fabaff fabaff merged commit 7b3d17b into dev Mar 31, 2018
6 checks passed
@fabaff fabaff deleted the mastodon branch Mar 31, 2018
@balloob balloob mentioned this pull request Apr 13, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants