From efc8c755be2da9858770fc704d0447312b8997e5 Mon Sep 17 00:00:00 2001 From: reubenmiller Date: Tue, 6 Oct 2026 22:47:52 +0200 Subject: [PATCH] feat(modbus): show the pump mode as off/auto/manual in tedge-dot The tedge-dot point library maps the mode holding register to its names with tedge-dot's value map, so samples, the twin and the generated DTM definition carry "off", "auto" or "manual" instead of 0..2, and the Parameters tab offers a dropdown. Writes take the name. The min/max bounds are dropped: the map bounds the values, and on a string enum they only leaked into the DTM schema. Needs a tedge-dot with value maps (0.0.11 or later). Co-Authored-By: Claude Opus 5.5 --- apps/modbus-server/points.d/modbus/zephyr-modbus-pump.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/modbus-server/points.d/modbus/zephyr-modbus-pump.toml b/apps/modbus-server/points.d/modbus/zephyr-modbus-pump.toml index 83462a7..81528ca 100644 --- a/apps/modbus-server/points.d/modbus/zephyr-modbus-pump.toml +++ b/apps/modbus-server/points.d/modbus/zephyr-modbus-pump.toml @@ -108,7 +108,8 @@ description = "0=off, 1=auto, 2=manual" datatype = "uint16" access = "read_write" address = { table = "holding", address = 1, count = 1 } -meta = { parameter = { min = 0, max = 2, group = ["control"] } } +map = { cases = [{ eq = 0, to = "off" }, { eq = 1, to = "auto" }, { eq = 2, to = "manual" }], default = "unknown" } +meta = { parameter = { group = ["control"] } } [[point]] id = "running"