Include index and instance in object_id of zwave devices (#3759)

* Include index and instance in object_id of zwave devices

* Add the instance id if there is more than one instance for the value
This commit is contained in:
Lukas authored and Paulus Schoutsen committed 2016-10-13 21:13:05 -07:00
1 parent 7771cc2ccf
commit 1373db8b60
2 files changed
+2 -27

No files matched your search

+2 -1
View File
@@ -181,7 +181,8 @@ def _object_id(value):
The object_id contains node_id and value instance id
to not collide with other entity_ids.
"""
object_id = "{}_{}".format(slugify(_value_name(value)), value.node.node_id)
object_id = "{}_{}_{}".format(slugify(_value_name(value)),
value.node.node_id, value.index)
# Add the instance id if there is more than one instance for the value
if value.instance > 1: