feat(cli): read should print the label of an enum value

Open
#792 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
76/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, typescript
Domain
cli

Research direction

Start by locating the read command's JSON and table output paths, then check how driver enumValues reach the data points. Add the label to JSON while preserving the numeric value, show it beside the number in the table, and document the field in the CLI README. Done when tests cover both formats and the README shows the new field.

Written by the indexing model from the issue text.

Description

codex-ok

Found while testing driver PRs on real devices (2026-11-19).

ya-modbus read --all --format json prints an enum data point as its number only, for example "id": "mode", "value": 1. The drivers have the labels (enumValues, for example heating), and the old homy readers published the labels as text. To compare a real read with the old reader's message one must look up each label by hand in the driver source. The JSON also has no enumValues for these data points.

Done when

  • For a data point with enumValues, read --format json also gives the label (for example "label": "heating"), keeping value as the number.
  • The table format shows the label next to the number.
  • The CLI README shows the new field.
  • A test covers both formats.
Dominant language
TypeScript
Stars
3
Forks
0
Avg merge
13h 46m
Merged PRs (30d)
58

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from groupsky/ya-modbus

All issues in groupsky/ya-modbus

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.