From e9ddfa7e26ca513d7693033ad33041afe521ff38 Mon Sep 17 00:00:00 2001 From: K7ZVX Date: Tue, 5 May 2026 04:16:00 +0000 Subject: [PATCH] fix: Add node_num property to NodeHealth class NodeHealth stored node_id as hex string but mesh_reporter.py expected node_num integer. Added computed property to convert. --- meshai/mesh_health.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshai/mesh_health.py b/meshai/mesh_health.py index 5e138e8..b6cfd87 100644 --- a/meshai/mesh_health.py +++ b/meshai/mesh_health.py @@ -125,6 +125,13 @@ class NodeHealth: score: HealthScore = field(default_factory=HealthScore) @property + def node_num(self) -> int: + """Convert node_id hex string to integer.""" + if self.node_id.startswith("!"): + return int(self.node_id[1:], 16) + return int(self.node_id, 16) + + @property def non_text_packets(self) -> int: """Non-text packets in 24h.""" return self.packet_count_24h - self.text_packet_count_24h