From 56575615b449e15f2135c30f39995b8d14141f41 Mon Sep 17 00:00:00 2001 From: Rian Brooks-Kane Date: Fri, 9 Jan 2026 19:53:10 +1000 Subject: [PATCH] Fix MQTT creating unnamed device in Home Assistant Remove via_device field from HA discovery which referenced a non-existent "SunGather" device, causing Home Assistant to create an empty "Unnamed device". --- SunGather/exports/mqtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SunGather/exports/mqtt.py b/SunGather/exports/mqtt.py index 8d5c44e..1565df9 100644 --- a/SunGather/exports/mqtt.py +++ b/SunGather/exports/mqtt.py @@ -93,7 +93,7 @@ def publish(self, inverter): if self.mqtt_config['homeassistant'] and not self.ha_discovery_published: # Build Device, this will be the same for every message - ha_device = { "name":f"Sungrow {self.model}", "manufacturer":"Sungrow", "model":self.model, "identifiers":self.serial_number, "via_device": "SunGather", "connections":[["address", inverter.getHost() ]]} + ha_device = { "name":f"Sungrow {self.model}", "manufacturer":"Sungrow", "model":self.model, "identifiers":self.serial_number, "connections":[["address", inverter.getHost() ]]} for ha_sensor in self.ha_sensors: config_msg = {}