Skip to content

Commit

Permalink
Breaking Change: Fix #409: Unable to set up 2 cameras with the same n…
Browse files Browse the repository at this point in the history
…ame properly
  • Loading branch information
JurajNyiri committed Oct 5, 2023
1 parent 7bcc9cd commit cde4e46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/tapo_control/tapo/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from homeassistant.components.number import NumberEntity
from homeassistant.helpers.entity import DeviceInfo, Entity
from homeassistant.helpers.entity import EntityCategory
from homeassistant.util import slugify

from ..const import BRAND, LOGGER, DOMAIN
from ..utils import build_device_info
Expand Down Expand Up @@ -41,8 +42,7 @@ def device_info(self) -> DeviceInfo:
@property
def unique_id(self) -> str:
id_suffix = "".join(self._name_suffix.split())

return "{}-{}".format(self._name, id_suffix).lower()
return "{}-{}-{}".format(self._attributes["mac"], self._name, id_suffix).lower()

@property
def model(self):
Expand Down

0 comments on commit cde4e46

Please sign in to comment.