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:
parent
2116600e24
commit
97fbaf8818
@ -136,7 +136,10 @@ impl RpcHandler {
|
|||||||
"bitcoin": bitcoin,
|
"bitcoin": bitcoin,
|
||||||
"mesh": mesh,
|
"mesh": mesh,
|
||||||
"lightning": lightning,
|
"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!({})),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user