Hi there,
I am experiences problems with entity adoption from a MQTT topic published by lnxlink. lnxlink is a linux utility that published MQTT topics related to host machine hardware and software.
Here's a practical example of what is happening on my laptop.
Used broker: Mosquitto broker as a add-on on my main Home Assistant server
lnxlink publishes the following payload under topic lnxlink/laptop-01/monitor_controls/battery:
{
"Hewlett-Packard Primary 01234 2024/10/22": {
"percent": 100.0,
"attributes": {
"vendor": "Hewlett-Packard",
"model": "Primary",
"serial": "01234 2024/10/22",
"native_path": "BAT0",
"rechargeable": true,
"status": "fully charged",
"time_to_empty": 0,
"time_to_full": 0
}
},
"Wireless Mouse": {
"percent": 100.0,
"attributes": {
"vendor": "",
"model": "Wireless Mouse",
"serial": "11-22-33-44",
"native_path": "hidpp_battery_2",
"rechargeable": true,
"status": "fully charged",
"time_to_empty": 0,
"time_to_full": 0
}
},
"AC": {
"percent": 0.0,
"attributes": {
"vendor": "",
"model": "",
"serial": "",
"native_path": "AC",
"rechargeable": false,
"status": "unknown",
"time_to_empty": 0,
"time_to_full": 0
}
}
}
When reviewing the topic in MQTT Explorer, everything seems to be OK.
This topic is then adopted by Home Assistant. The following topics are created on the broker:
homeassistant/sensor/lnxlink/laptop-01_battery_ac/confighomeassistant/sensor/lnxlink/laptop-01_wireless_mouse/confighomeassistant/sensor/lnxlink/laptop-01_battery_hewlett-packard_primary_01234_2024/10/22/config
The first two topics are then processed into actual entities.
The topic related to the main battery (third item in the list above) has two more levels, and Home Assistant fails to create a corresponding entity.