• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zwave-js / zwave-js-ui / 33762347505
13%

Build:
DEFAULT BRANCH: master
Ran 03 Sep 2026 01:40PM UTC
Jobs 1
Files 50
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Sep 2026 01:39PM UTC coverage: 13.161% (-0.06%) from 13.218%
33762347505

push

github

web-flow
fix(mqtt): resolve unknown command class names via zwave-js (#4815)

Closes #4803

## Problem

`Constants.commandClass()` resolved a CC id to a topic segment through
`_commandClassMap`, a hardcoded OpenZWave-era table:

```ts
export function commandClass(cmd: number): string {
	return _commandClassMap[cmd] || `unknownClass_${cmd}`
}
```

The map has **91 entries; zwave-js knows 125 command classes**. Window
Covering (`0x6a`) is not in it, so with the NAMED gateway type
`Gateway.valueTopic()` built topics like:

```
zwave/<node>/unknownClass_106/endpoint_0/currentValue
```

Unrelated to #4794 — that one only adds the HA discovery config, the
topic name comes from here.

## All CCs affected

44 command classes were missing. The ones users actually meet:

`0x53` Schedule, `0x59` Association Group Information, `0x64` Humidity
Control Setpoint, `0x6a` Window Covering, `0x6b` Irrigation, `0x6c`
Supervision, `0x6d` Humidity Control Mode, `0x6e` Humidity Control
Operating State, `0x6f` Entry Control, `0x74` Inclusion Controller,
`0x78` Node Provisioning, `0x83` User Credential, `0x9f` Security 2.

Plus the Z/IP, metering-tariff, HRV, prepayment and authentication
classes nobody is likely to hit.

## Change

Fall back to `getCCName()` from `@zwave-js/core`, snake_cased, when the
CC is not in the map:

```
commandClass(0x6a) -> "window_covering"   // was "unknownClass_106"
commandClass(0x9f) -> "security_2"
commandClass(0x26) -> "switch_multilevel" // unchanged, legacy name wins
commandClass(-1)   -> "unknownClass_-1"   // unchanged
```

`getCCName()` returns `unknown (0x24)` for ids it doesn't know, so that
case still produces `unknownClass_<id>`.

### The map keeps only the names that actually differ

It can't just be replaced by `getCCName()` — **42 of its 91 names are
OZW names that disagree** with the zwave-js ones:

| map | zwave-js |
| --- | --- |
| `switch_binary` | `binary_switch` |
| `switch_multilevel` | `multilevel_switch` |
| `sensor_multilevel` | ... (continued)

537 of 4566 branches covered (11.76%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 1 file covered. (100.0%)

9 existing lines in 1 file now uncovered.

991 of 7044 relevant lines covered (14.07%)

2.2 hits per line

Coverage Regressions

Lines Coverage ∆ File
9
67.33
-5.45% api/lib/logger.ts
Jobs
ID Job ID Ran Files Coverage
1 33762347505.1 03 Sep 2026 01:40PM UTC 50
13.16
GitHub Action Run
Source Files on build 33762347505
  • Tree
  • List 50
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • f7990b83 on github
  • Prev Build on master (#33758260884)
  • Next Build on master (#33762729977)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc