-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Add unique_id for mqtt binary sensor #14929
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
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.
Complete the test, otherwise looks good!
'unique_id': 'TOTALLY_UNIQUE' | ||
}] | ||
}) | ||
|
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.
We should test the unique id functionality by firing an mqtt message. See sensor mqtt tests.
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.
Apologies, when splitting I missed a few lines and unfortunately test passed without those. I'll be more attentive on next split.
@MartinHjelmare Fixed test and added documentation as well. |
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.
Great!
* Added unique_id for mqtt binary sensor * Added missing mqtt message fire in test
* Added unique_id for mqtt binary sensor * Added missing mqtt message fire in test
Description:
Added unique_id for mqtt binary sensor. Use case for zigbee2mqtt to allow renaming just like xiaomi_aqara.
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5538
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code does not interact with devices: