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

zwave-js / zwave-js-ui / 25542897926
19%

Build:
DEFAULT BRANCH: master
Ran 08 May 2026 07:25AM UTC
Jobs 1
Files 70
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

08 May 2026 07:24AM UTC coverage: 18.596% (+0.3%) from 18.314%
25542897926

push

github

web-flow
feat(hass): add reactive_power/reactive_energy, expand HA sensor device classes, and fix unit casing (#4629)

HA MQTT discovery fails for kVar and kVarh meter values due to wrong
device classes and mixed-case units. Additionally, the device class
dropdown was missing many HA sensor classes added since this list was
last updated.

## Changes

- **`api/lib/Constants.ts` — `meterType()`**: Add explicit cases for
electric meter reactive scales:
- `case 0x07` (kVar) → `device_class: reactive_power`, `state_class:
measurement`
- `case 0x08` (kVarh) → `device_class: reactive_energy`, `state_class:
total_increasing`

- **`api/lib/Constants.ts` — `deviceClass.sensor`**: Expand from 12 to
32 entries covering all current HA sensor device classes
(`apparent_power`, `aqi`, `carbon_dioxide`, `frequency`,
`reactive_energy`, `reactive_power`, `wind_speed`, etc.)

- **`api/lib/Gateway.ts` — unit normalization**: Normalize `kVar` →
`kvar` and `kVarh` → `kvarh` alongside existing time-unit conversions,
so the `unit_of_measurement` in MQTT discovery messages uses the
lowercase form that HA validates

- **`src/components/dialogs/DialogGatewayValue.vue`**: Sync the device
class dropdown to match — users can now manually assign any current HA
sensor device class including `reactive_energy` and `reactive_power`

- **`test/lib/Constants.test.ts`**: Add `#meterType()` suite (kWh, W,
kVar, Power Factor) and `#deviceClass` constant assertions

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: robertsLando <11502495+robertsLando@users.noreply.github.com>
Co-authored-by: Daniel Lando <daniel.sorridi@gmail.com>

339 of 455 branches covered (74.51%)

Branch coverage included in aggregate %.

39 of 50 new or added lines in 2 files covered. (78.0%)

4142 of 23641 relevant lines covered (17.52%)

1.12 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
18.81
-0.04% api/lib/Gateway.ts
5
94.43
4.2% api/lib/Constants.ts
Jobs
ID Job ID Ran Files Coverage
1 25542897926.1 08 May 2026 07:25AM UTC 70
18.6
GitHub Action Run
Source Files on build 25542897926
  • Tree
  • List 70
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 7e61d4b3 on github
  • Prev Build on master (#25369828287)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc