Skip to content

Rest notify data#7757

Merged
fabaff merged 3 commits into
home-assistant:devfrom
Teagan42:rest_notify_data
May 29, 2017
Merged

Rest notify data#7757
fabaff merged 3 commits into
home-assistant:devfrom
Teagan42:rest_notify_data

Conversation

@Teagan42
Copy link
Copy Markdown
Contributor

@Teagan42 Teagan42 commented May 24, 2017

Description:

Add ability to push extra data to the rest notification component

Related issue (if applicable): fixes #

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

Example entry for configuration.yaml (if applicable):

notify:
  - name: NOTIFIER_NAME
    platform: rest
    resource: http://IP_ADDRESS/ENDPOINT
    data:
       actions:
         - title: ACTION_TITLE
            topic: ACTION_TOPIC

Checklist:

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

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

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable ([example][ex-requir]).
  • New dependencies are only imported inside functions that use them ([example][ex-import]).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

@mention-bot
Copy link
Copy Markdown

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

Comment thread homeassistant/components/notify/rest.py Outdated
vol.Optional(CONF_DATA,
default=None): dict,
vol.Optional(CONF_DATA_TEMPLATE,
default=None): { cv.match_all: cv.template_complex }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace after '{'
whitespace before '}'

@MartinHjelmare
Copy link
Copy Markdown
Member

Should we make the _data_template_creator a public template helper function? I know it's used in the service helper module too at least.

@Teagan42
Copy link
Copy Markdown
Contributor Author

Teagan42 commented May 26, 2017 via email

@MartinHjelmare
Copy link
Copy Markdown
Member

Yeah, good to make that another PR. This one looks good!

@fabaff fabaff merged commit eff619a into home-assistant:dev May 29, 2017
@balloob balloob mentioned this pull request Jun 2, 2017
@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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants