-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
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
zha: Add unique_id to entities #12331
Conversation
@@ -240,6 +241,7 @@ def async_device_initialized(self, device, join): | |||
'in_clusters': {cluster.cluster_id: cluster}, | |||
'out_clusters': {}, | |||
'new_join': join, | |||
'unique_id': '%s-%s-%s' % (device.ieee, endpoint_id, cluster_id), |
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.
line too long (85 > 79 characters)
@@ -214,6 +214,7 @@ def async_device_initialized(self, device, join): | |||
'in_clusters': {c.cluster_id: c for c in in_clusters}, | |||
'out_clusters': {c.cluster_id: c for c in out_clusters}, | |||
'new_join': join, | |||
'unique_id': '%s-%s' % (device.ieee, endpoint_id), |
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.
Please use new style string formatting.
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.
Ie:
'{}-{}'.format(arg1, arg2)
@@ -240,6 +241,8 @@ def async_device_initialized(self, device, join): | |||
'in_clusters': {cluster.cluster_id: cluster}, | |||
'out_clusters': {}, | |||
'new_join': join, | |||
'unique_id': '%s-%s-%s' % (device.ieee, endpoint_id, |
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.
Same as above.
Description:
Related issue (if applicable): fixes #12215
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml
(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass