Skip to content

Add documentation for availability topic and payloads #3378

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

Merged
merged 4 commits into from
Sep 25, 2017
Merged

Add documentation for availability topic and payloads #3378

merged 4 commits into from
Sep 25, 2017

Conversation

marthoc
Copy link
Contributor

@marthoc marthoc commented Sep 16, 2017

Description:

Added documentation for availability topic and payloads added in pull requests. Also cleaned up documentation for the MQTT cover generally to make clear the differences between state topic and messages and availability topic and messages, and the MQTT binary sensor generally.

Pull request in home-assistant (if applicable): home-assistant/core#9445, home-assistant/core#9507

Added documentation for availabiltiy topic and payloads added in a pull request. Also cleaned up documentation for the MQTT cover generally to make clear the differences between state topic and messages and availability topic and messages.
@mention-bot
Copy link

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

Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

One comment.

- **optimistic** (*Optional*): Flag that defines if switch works in optimistic mode. Default is `true` if no state topic defined, else `false`.
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is `0`. Will also be used when publishing messages.
- **retain** (*Optional*): If the published message should have the retain flag on or not. Default is `false`.
- **qos** (*Optional*): The maximum QoS level to be used when receiving and publishing messages.
Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep the info on default qos value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. Added.

Added documentation for availability topic and payloads added to the MQTT binary sensor in a pull request. Also cleaned up documentation for the MQTT binary sensor generally.
@marthoc
Copy link
Contributor Author

marthoc commented Sep 20, 2017

Added another commit to this PR to address additional functionality added in another PR (noted above).

@MartinHjelmare
Copy link
Member

Please keep the PRs as small as possible. That way the review is easier and the PR will get merged quicker. It's better to make two smaller PRs than one larger.

@marthoc
Copy link
Contributor Author

marthoc commented Sep 20, 2017

@MartinHjelmare Yes sorry about that - this was accidental and I will make separate PRs for future documentation updates.

- **availability_topic** (*Optional*): The MQTT topic subscribed to receive birth and LWT messages from the MQTT device. If `availability_topic` is not defined, the binary sensor availability state will always be `available`. If `availability_topic` is defined, the binary sensor availability state will be `unavailable` by default.
- **payload_available** (*Optional*): The payload that represents the online state. Default is `online`.
- **payload_not_available** (*Optional*): The payload that represents the offline state. Default is `offline`.
- **qos** (*Optional*): The maximum QoS level to be used when receiving and publishing messages. Default is `0`.
Copy link
Member

Choose a reason for hiding this comment

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

The binary sensor implementation in home assistant doesn't publish messages, right? I guess this is a standard phrase, but it could be confusing like this.

Copy link
Member

@fabaff fabaff left a comment

Choose a reason for hiding this comment

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

Thanks 🐦

@fabaff fabaff merged commit 3912824 into home-assistant:next Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants