-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Conversation
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.
@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. |
There was a problem hiding this 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Added another commit to this PR to address additional functionality added in another PR (noted above). |
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. |
@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`. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🐦
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