Skip to content

Feature Request: Expose MAC address as device connection by parsing LG deviceId #970

Description

@robinhood-code

Summary

Some LG ThinQ devices (e.g. washers) include a MAC-like value embedded in the deviceId, but the integration does not currently expose this as a connections entry in device_info.

As a result, Home Assistant cannot associate these devices with other integrations (e.g. UniFi Network) that identify the same physical device via MAC address.

Current Behaviour

SmartThinQ device (LG washer)

{  
  "name": "Front Load Washer",  
  "identifiers": [["smartthinq_sensors","846531f1-6ed3-1a0c-934a-4cbce9d53a0e"]],  
  "connections": [],  
  "manufacturer": "LG",  
  "model": "F_V__F___W.B__QEUK-FL (WASHER)"
}

UniFi device (same physical washer)

{  
  "name": "lg_washer",  
  "connections": [["mac","4c:bc:e9:d5:3a:0e"]],  
  "manufacturer": "LG Innotek"
}

Key Observation

The LG ThinQ deviceId appears to embed the MAC address:

deviceId: 846531f1-6ed3-1a0c-934a-4cbce9d53a0e                              

The last 12 hex characters match the MAC
This matches exactly the MAC seen by the UniFi integration

Debug / Logs / Evidence

1. Device Registry Evidence

From /config/.storage/core.device_registry:

SmartThinQ device

"connections": []

UniFi device

"connections": [["mac","4c:bc:e9:d5:3a:0e"]]

No shared connections → Home Assistant cannot associate devices.

2. SmartThinQ Integration Code Path

From init.py (relevant snippet):

if self._mac and not self._root_dev_id:    
   data["connections"] = {(dr.CONNECTION_NETWORK_MAC, self._mac)}

This shows that MAC is only registered if device_info.macaddress exists.

Expected Behaviour

If a MAC address can be derived, the integration should expose:

connections={(dr.CONNECTION_NETWORK_MAC, parsed_mac)}

This will allow Home Assistant to:

  • Link ThinQ device with UniFi client
  • Merge entities under a single device
  • Provide consistent cross-integration behaviour

Suggested Approach

Fallback logic define in in init.py when macaddress is unavailable:

def extract_mac_from_device_id(device_id: str) -> str | None:    
      clean = device_id.replace("-", "")        
      if len(clean) >= 12:
          suffix = clean[-12:]
          return ":".join(suffix[i:i+2] for i in range(0, 12, 2))
      return None

Then modify device_info:

if not self._mac:
    parsed_mac = extract_mac_from_device_id(self._device_id)
    if parsed_mac:
        self._mac = dr.format_mac(parsed_mac)
if self._mac and not self._root_dev_id:
    data["connections"] = {(dr.CONNECTION_NETWORK_MAC, self._mac)}

I've tested this on my own setup and it's working as described:

Image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions