Skip to content

Conversation

BioSehnsucht
Copy link
Contributor

Description:
Documentation for HipChat notification component.

Pull request in home-assistant (if applicable): home-assistant/core#8918

I'm making an assumption in the docs that the ha_release will be 0.51. I didn't find any recommendation for what you should put when it's not released yet.

@Landrash Landrash added the new-integration This PR adds documentation for a new Home Assistant integration label Aug 10, 2017
@BioSehnsucht
Copy link
Contributor Author

I just noticed that a 0.51 PR was created about the same time I was making these PR's. Let me know if I should bump the ha_release in the documentation page to something else (or make it something other entirely).

Copy link
Contributor

@Landrash Landrash left a comment

Choose a reason for hiding this comment

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

Looks good with some minor feedback 👍

footer: true
logo: hipchat.png
ha_category: Notifications
ha_release: "0.51"
Copy link
Contributor

Choose a reason for hiding this comment

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

Bump to 0.52 as suggested 👍

---


The `hipchat` platform allows you to deliver notifications from Home Assistant to [HipChat](https://hipchat.com/).
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace deliver with send?

- name: NOTIFIER_NAME
platform: hipchat
token: ABCDEFGHJKLMNOPQRSTUVXYZ
room: '1234567'
Copy link
Contributor

Choose a reason for hiding this comment

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

Are the quotes around the number necessary?

Copy link
Contributor Author

@BioSehnsucht BioSehnsucht Aug 11, 2017

Choose a reason for hiding this comment

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

The API treats it as a string rather than a number, and I suppose there's the possibility that a room ID might be non-numeric (though I haven't seen any).

edit: I could certainly accept an int instead of str and then cast back to str when calling API, it would only be a minor code change, but as it is currently implemented a str is required/assumed

edit2: Actually, I may be an idiot. nothing else is using quotes that are strings. I guess we don't need them.


- **name** (*Optional*): Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`.
- **token** (*Required*): The HipChat API token to use for sending HipChat notifications.
- **room** (*Required*): The default room to post to if no room is explicitly specified when sending the notification message.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest you remove the word message since it's redundant.

- **token** (*Required*): The HipChat API token to use for sending HipChat notifications.
- **room** (*Required*): The default room to post to if no room is explicitly specified when sending the notification message.
- **color** (*Optional*): Setting color will override the default color for the notification. By default not setting this will post to HipChat using the default color yellow. Valid options are 'yellow', 'green', 'red', 'purple', 'gray', 'random'.
- **notify** (*Optional*): Setting notify will override the default notify (blink application icon, chime, or otherwise call attention) setting for the notification. By default this is false. Valid options are true and false.
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrap the available values in quotes for readability.

true , false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be true / false (bool) not 'true' / 'false' (str), so I didn't put in quotes. I can change it, or is there a better third option for making it clear without implying str?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess it may be irrelevant since it should be cast appropriately to bool by voluptuous? In which case I'll make that change to use quotes. The gotcha though would be that magic str to bool doesn't happen when passing data JSON to notify service, probably, so should clarify in that section that it should be bool.

@BioSehnsucht
Copy link
Contributor Author

@Landrash I've made changes based on your suggestions.

Copy link
Contributor

@Landrash Landrash left a comment

Choose a reason for hiding this comment

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

Looks good and can be merged when parent PR is merged.

@BioSehnsucht
Copy link
Contributor Author

Updated docs to reflect changes made to use a PyPi library.

Copy link
Contributor

@Landrash Landrash left a comment

Choose a reason for hiding this comment

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

Looks good and can be merged when parent PR is merged.

@emlove emlove merged commit 13fdb19 into home-assistant:next Aug 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-integration This PR adds documentation for a new Home Assistant integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants