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
merged 3 commits into from Mar 31, 2018

Conversation

@fabaff
Copy link
Member

commented Mar 24, 2018

Description:

This notification platform uses Mastodon to deliver messages.

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5010

Example entry for configuration.yaml (if applicable):

notify:
  - 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 %}!"
}

Checklist:

  • 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/gen_requirements_all.py.
  • New files were added to .coveragerc.

@fabaff fabaff requested a review from andrey-git as a code owner Mar 24, 2018

@fabaff fabaff referenced this pull request Mar 24, 2018
2 of 2 tasks complete
@tinloaf
Copy link
Contributor

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.

@fabaff

This comment has been minimized.

Copy link
Member Author

commented Mar 27, 2018

You are right. I will change that.

@pvizeli

This comment has been minimized.

Copy link
Member

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

Revert "Move login"
This reverts commit 2c8446f.

@fabaff fabaff merged commit 7b3d17b into dev Mar 31, 2018

6 checks passed

WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.002%) to 93.95%
Details
hound No violations found. Woof!

@fabaff fabaff deleted the mastodon branch Mar 31, 2018

@balloob balloob referenced 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.
Projects
None yet
4 participants
You can’t perform that action at this time.