Skip to content

Add mac address to mqtt device connections#4071

Open
flabbamann wants to merge 1 commit into
jomjol:mainfrom
flabbamann:mqtt-connections-mac
Open

Add mac address to mqtt device connections#4071
flabbamann wants to merge 1 commit into
jomjol:mainfrom
flabbamann:mqtt-connections-mac

Conversation

@flabbamann

Copy link
Copy Markdown

If the same device is added to Home Assistant by multiple integrations, HA can merge these devices into one based on the information these devices provide. I added the devices mac address to the auto discovery messages as described in https://www.home-assistant.io/integrations/sensor.mqtt/#device :

{
  "device": {
    "identifiers": ["watermeter"],
    "connections": [["mac", "A1:B2:C3:D4:E5:F6"]],
    "name": "watermeter",
    "model": "Meter Digitizer",
    "manufacturer": "AI on the Edge Device",
    "sw_version": "main (a1ccda2)",
    "configuration_url": "http://192.168.47.78"
  }
}

My FritzBox router has an integration that adds all connected devices to HA. Initially I had two devices in HA, one from my FritzBox and one from MQTT (AI-on-the-edge-device). With this change these devices get merged into one:
screenshot

With this I also think we don't need the mac address as a seperate entity/topic anymore, but I don't know if people want/need this for their setups 🤔.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant