Skip to content

Add BITUO TECHNIK OEM devices for the Zemismart manufacturer#2986

Merged
cbaumler merged 3 commits into
SmartThingsCommunity:mainfrom
script0803:main
May 26, 2026
Merged

Add BITUO TECHNIK OEM devices for the Zemismart manufacturer#2986
cbaumler merged 3 commits into
SmartThingsCommunity:mainfrom
script0803:main

Conversation

@script0803
Copy link
Copy Markdown
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

Add BITUO TECHNIK OEM devices for the Zemismart manufacturer.

Summary of Completed Tests

test_zigbee_power_meter_1p_ZM
test_zigbee_power_meter_2p_ZM
test_zigbee_power_meter_3p_ZM

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

Channel deleted.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

Test Results

   73 files  + 1    515 suites  +4   0s ⏱️ ±0s
2 898 tests +31  2 898 ✅ +31  0 💤 ±0  0 ❌ ±0 
4 794 runs  +54  4 794 ✅ +54  0 💤 ±0  0 ❌ ±0 

Results for commit ccb6da2. ± Comparison against base commit 3015ace.

This pull request removes 2 and adds 33 tests. Note that renamed tests count towards both.
Switch capability should send the appropriate commands
Switch child device: Set color temperature should send the appropriate commands
AC code report: fan=2 (high) and mode=4 (cool)
AC code report: fanonly mode (5)
AC code report: heat + medium fan + swing + setpoint 25.00 should emit all events
AC code report: invalid frame (b15_8 < 0xFE) should skip setpoint emit
AC code report: pending_on_mode + incoming off should NOT overwrite mode
AC code report: pwr=0 (off) should emit thermostatMode 'off'
AC code report: pwr=0xF (invalid) should skip thermostatMode update
AC code report: setpoint 0xFFFF (invalid marker) should skip setpoint emit
AC code report: unknown mode bits should fall back to 'heat'
Capability fanMode 'high' sends AC code with fan bits=2
…

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

File Coverage
All files 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-power-meter/src/frient/EMIZB-151/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-power-meter/src/lazy_load_subdriver.lua 57%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-power-meter/src/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-power-meter/src/configurations.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-power-meter/src/frient/init.lua 93%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against ccb6da2

Copy link
Copy Markdown
Contributor

@cjswedes cjswedes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a few formatting changes needed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the copywrite header to the new test files

end
)

test.run_registered_tests() No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: please have a trailing newline at the end of each of the test files

Comment on lines +93 to +108
test.register_message_test(
"ActivePower Report should be handled. Sensor value is in W, capability attribute value is in hectowatts",
{
{
channel = "zigbee",
direction = "receive",
message = { mock_device.id, ElectricalMeasurement.attributes.ActivePower:build_test_attr_report(mock_device,
27) },
},
{
channel = "capability",
direction = "send",
message = mock_device:generate_test_message("PhaseA", capabilities.powerMeter.power({ value = 27.0, unit = "W" }))
}
}
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical test can be removed.

Suggested change
test.register_message_test(
"ActivePower Report should be handled. Sensor value is in W, capability attribute value is in hectowatts",
{
{
channel = "zigbee",
direction = "receive",
message = { mock_device.id, ElectricalMeasurement.attributes.ActivePower:build_test_attr_report(mock_device,
27) },
},
{
channel = "capability",
direction = "send",
message = mock_device:generate_test_message("PhaseA", capabilities.powerMeter.power({ value = 27.0, unit = "W" }))
}
}
)

end
end
if string.find(device:get_model(), "SPM02") or string.find(device:get_model(), "SDM01W") then
if string.find(device:get_model(), "SPM02") or string.find(device:get_model(), "SDM01W") or string.find(device:get_model(), "SDM01-3Z1", 1, true)then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if string.find(device:get_model(), "SPM02") or string.find(device:get_model(), "SDM01W") or string.find(device:get_model(), "SDM01-3Z1", 1, true)then
if string.find(device:get_model(), "SPM02") or string.find(device:get_model(), "SDM01W") or string.find(device:get_model(), "SDM01-3Z1", 1, true) then

Copy link
Copy Markdown
Contributor

@nand-nor nand-nor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just needs to formatting changes @cjswedes already requested but others LGTM

@cbaumler
Copy link
Copy Markdown
Contributor

@cjswedes it looks like the formatting changes have been addressed. Could you give this a final review?

@cbaumler cbaumler merged commit 8d9f3a7 into SmartThingsCommunity:main May 26, 2026
13 of 16 checks passed
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.

5 participants