Appended subswitch id (i.e., dps) to the unique_id to allow different unique_ids for subswitches

This commit is contained in:
rospogrigio
2020-09-03 16:39:06 +02:00
parent a0bf22cce5
commit f6169c442a

View File

@@ -224,7 +224,7 @@ class TuyaDevice(SwitchEntity):
@property
def unique_id(self):
"""Return unique device identifier."""
return f"local_{self._device.unique_id}"
return f"local_{self._device.unique_id}_{self._switch_id}"
@property
def available(self):