From 9d445098f4fd40e92e7a9c0878dcd2418fcc849d Mon Sep 17 00:00:00 2001 From: Ian McEwen Date: Sun, 14 Jun 2026 20:39:26 -0700 Subject: [PATCH] small fixes --- meshtastic/node.py | 2 +- meshtastic/tests/test_node.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/node.py b/meshtastic/node.py index 51b0eed..3554cc1 100644 --- a/meshtastic/node.py +++ b/meshtastic/node.py @@ -403,7 +403,7 @@ class Node: if u.get("hwModel") and u["hwModel"] != "UNSET": contact.user.hw_model = mesh_pb2.HardwareModel.Value(u["hwModel"]) if u.get("role"): - contact.user.role = u["role"] + contact.user.role = config_pb2.Config.DeviceConfig.Role.Value(u["role"]) if u.get("publicKey"): contact.user.public_key = base64.b64decode(u["publicKey"]) if u.get("isLicensed"): diff --git a/meshtastic/tests/test_node.py b/meshtastic/tests/test_node.py index 6006f99..7065fc0 100644 --- a/meshtastic/tests/test_node.py +++ b/meshtastic/tests/test_node.py @@ -1,9 +1,9 @@ """Meshtastic unit tests for node.py""" # pylint: disable=C0302 +import base64 import logging import re -import base64 from unittest.mock import MagicMock, patch import pytest