Fix temperature duplication in MQTT payload
Temperature now only appears at root level, not in details. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -177,10 +177,11 @@ class LanChecker:
|
||||
}
|
||||
|
||||
if result.details:
|
||||
payload["details"] = result.details
|
||||
# Extract temperature for SNMP checks
|
||||
if "temperature" in result.details:
|
||||
payload["temperature"] = result.details["temperature"]
|
||||
payload["temperature"] = result.details.pop("temperature")
|
||||
if result.details:
|
||||
payload["details"] = result.details
|
||||
|
||||
topic = f"lan_checker/{check['id']}/state"
|
||||
self.mqtt_client.publish(topic, json.dumps(payload), retain=True)
|
||||
|
||||
Reference in New Issue
Block a user