diff --git a/custom_components/gree/climate.py b/custom_components/gree/climate.py index 539373e..f3a00a3 100644 --- a/custom_components/gree/climate.py +++ b/custom_components/gree/climate.py @@ -759,7 +759,7 @@ def unique_id(self): def device_info(self) -> DeviceInfo: """Return device information.""" return DeviceInfo( - identifiers={(DOMAIN, self._mac_addr)}, + identifiers={(DOMAIN, self._sub_mac_addr)}, name=self._name, manufacturer="Gree", ) diff --git a/custom_components/gree/entity.py b/custom_components/gree/entity.py index e0f6968..3288f57 100644 --- a/custom_components/gree/entity.py +++ b/custom_components/gree/entity.py @@ -59,16 +59,16 @@ def _set_id(self) -> None: elif self.entity_description.icon is not None: self._attr_icon = self.entity_description.icon - self._attr_unique_id = f"{self._device._mac_addr}_{self.entity_description.key}" + self._attr_unique_id = f"{self._device._sub_mac_addr}_{self.entity_description.key}" @property def device_info(self) -> DeviceInfo: """Return device information.""" return DeviceInfo( - identifiers={(DOMAIN, self._device._mac_addr)}, + identifiers={(DOMAIN, self._device._sub_mac_addr)}, name=self._device._name, manufacturer="Gree", - connections={(CONNECTION_NETWORK_MAC, self._device._mac_addr)}, + connections={(CONNECTION_NETWORK_MAC, self._device._sub_mac_addr)}, ) @property