Skip to content

Conversation

@InovelliUSA
Copy link
Contributor

Check all that apply

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • New feature
  • Refactor

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have verified my changes by testing with a device or have communicated a plan for testing
  • I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

Description of Change

Adding the VZW31-SN dimmer switch. This device is very similar to the VZW32-SN so code addition is minimal.

Summary of Completed Tests

Tested on live device and tested with beta user. Need to run through the test suite still.

@github-actions
Copy link

Duplicate profile check: Passed - no duplicate profiles detected.

@github-actions
Copy link

@github-actions
Copy link

github-actions bot commented Dec 13, 2025

Test Results

   71 files    480 suites   0s ⏱️
2 482 tests 2 482 ✅ 0 💤 0 ❌
4 263 runs  4 263 ✅ 0 💤 0 ❌

Results for commit e6f6b78.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 13, 2025

File Coverage
All files 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/zwave-dual-switch/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/qubino-switches/init.lua 81%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/multi-metering-switch/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/inovelli/init.lua 77%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/inovelli/lzw31-sn/init.lua 89%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/preferences.lua 99%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/configurations.lua 99%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/lazy_load_subdriver.lua 57%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/inovelli-2-channel-smart-plug/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/qubino-switches/qubino-relays/init.lua 69%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/zooz-power-strip/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/qubino-switches/qubino-relays/qubino-flush-2-relay/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/aeotec-smart-switch/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/inovelli/vzw31-sn/can_handle.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/qubino-switches/qubino-relays/qubino-flush-1d-relay/init.lua 80%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/aeotec-heavy-duty/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/fibaro-wall-plug-us/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-switch/src/eaton-5-scene-keypad/init.lua 98%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against e6f6b78

@InovelliUSA
Copy link
Contributor Author

I got the certification request in and passed the test suite. One thing that was strange is that the default multilevel report handler was not sending the level: 0 event. This was causing the driver to timeout when set to 0%. I verified that my device was sending the correct report:

2025-12-20T23:16:21.173926679Z INFO Z-Wave Switch <ZwaveDevice: b79a7858-b383-4072-aaf9-9b5dc1a5e96b [84] (Inovelli Dimmer Red Series)> received Z-Wave command: {args={current_value="OFF_DISABLE", duration=0, target_value=0, value="OFF_DISABLE"}, cmd_class="SWITCH_MULTILEVEL", cmd_id="REPORT", dst_channels={}, encap="NONE", payload="\x00\x00\x00", src_channel=0, version=4}

To get it to pass the test I had to handle that report myself. I did not test yet if this is a problem on other devices (maybe something got changed on the default multilevel report handling)?

local function onoff_level_report_handler(driver, device, cmd)
local value = cmd.args.target_value and cmd.args.target_value or cmd.args.value
device:emit_event(value == 0 and capabilities.switch.switch.off() or capabilities.switch.switch.on())
device:emit_event(capabilities.switchLevel.level(value))
end

If I need to create some unit tests I can do it next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant