fix(pine): node-status mesh_message is {} instead of null when empty

HA's seeded REST sensor reads attributes via json_attributes_path
"$.mesh_message"; a null there makes HA log a "JSON result was not a
dictionary" warning on every 30s scan.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago 2026-07-22 04:54:20 -04:00
parent 2116600e24
commit 97fbaf8818

View File

@ -136,7 +136,10 @@ impl RpcHandler {
"bitcoin": bitcoin,
"mesh": mesh,
"lightning": lightning,
"mesh_message": mesh_message,
// Always an object: HA's REST sensor reads attributes via
// json_attributes_path "$.mesh_message", and a null there makes
// HA log a "JSON result was not a dictionary" warning every scan.
"mesh_message": mesh_message.unwrap_or_else(|| json!({})),
})
}
}