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

zwave-js / zwave-js-ui / 22772360183
18%

Build:
DEFAULT BRANCH: master
Ran 06 Mar 2026 04:31PM 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

06 Mar 2026 04:30PM UTC coverage: 18.308%. Remained the same
22772360183

push

github

web-flow
fix(ui): display 'unknown' for CC values with null value (#4582)

CC values with a literal `null` value (indicating an unknown state) were
displayed as the string `"null"` in the UI instead of `"unknown"`.

## Root cause

JavaScript's `typeof null === 'object'` quirk caused `null` to fall into
the object-serialization branch of `parsedValue`, returning
`JSON.stringify(null)` → the string `"null"`. The template's
`parsedValue == null` guard never triggered since `"null"` is a non-null
string.

## Fix

Added an explicit `=== null` guard before the `typeof === 'object'`
check in `parsedValue`:

```js
// ValueId.vue — parsedValue getter
if (this.modelValue.newValue === null) {
    return null  // template: parsedValue == null → displays 'unknown'
} else if (typeof this.modelValue.newValue === 'object') {
    return JSON.stringify(this.modelValue.newValue)
}
```

Returning `null` from the getter lets the existing template condition
`parsedValue == null ? 'unknown' : ...` handle it correctly, consistent
with how `undefined` values are already treated.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>CC values with value `null` shown as `null`</issue_title>
> <issue_description>When a CC value has the literal value `null`
(meaning known to be in an unknown state), the UI shows `null` for this
value instead.
> We should display `unknown` like we do when the value is
`undefined`.</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes zwave-js/zwave-js-ui#4581

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/zwave-js/zwave-js-ui/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%... (continued)

334 of 444 branches covered (75.23%)

Branch coverage included in aggregate %.

4054 of 23524 relevant lines covered (17.23%)

1.07 hits per line

Jobs
ID Job ID Ran Files Coverage
1 22772360183.1 06 Mar 2026 04:31PM UTC 70
18.31
GitHub Action Run
Source Files on build 22772360183
  • Tree
  • List 70
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • f7f2f27b on github
  • Prev Build on master (#22757619786)
  • Next Build on master (#22859843167)
  • 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