Skip to content

add MultiIR Smoke Detector MIR-SM200#2874

Open
thinkaName wants to merge 1 commit intoSmartThingsCommunity:mainfrom
thinkaName:multiir_smoke_detector_MIR_SM200
Open

add MultiIR Smoke Detector MIR-SM200#2874
thinkaName wants to merge 1 commit intoSmartThingsCommunity:mainfrom
thinkaName:multiir_smoke_detector_MIR_SM200

Conversation

@thinkaName
Copy link
Copy Markdown
Contributor

@thinkaName thinkaName commented Apr 3, 2026

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

Summary of Completed Tests

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Duplicate profile check: Passed - no duplicate profiles detected.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Test Results

   72 files    500 suites   0s ⏱️
2 746 tests 2 746 ✅ 0 💤 0 ❌
4 639 runs  4 639 ✅ 0 💤 0 ❌

Results for commit e509e7b.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

File Coverage
All files 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-smoke-detector/src/aqara/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-smoke-detector/src/MultiIR/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-smoke-detector/src/lazy_load_subdriver.lua 57%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-smoke-detector/src/frient/init.lua 98%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against e509e7b

@thinkaName thinkaName force-pushed the multiir_smoke_detector_MIR_SM200 branch from 0fbd389 to d907021 Compare April 3, 2026 03:38
@cbaumler cbaumler requested review from aleclorimer and cjswedes April 9, 2026 21:12
@thinkaName thinkaName force-pushed the multiir_smoke_detector_MIR_SM200 branch from d907021 to e509e7b Compare April 13, 2026 06:08
}
)

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: add newline to EOF

Comment on lines +37 to +39
local function do_configure(self, device)
device:configure()
end
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.

The defaults cover this and inject a refresh command. You should remove it and use the default.

Comment on lines +22 to +24
local function ias_zone_status_attr_handler(driver, device, zone_status, zb_rx)
generate_event_from_zone_status(driver, device, zone_status, zb_rx)
end
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
local function ias_zone_status_attr_handler(driver, device, zone_status, zb_rx)
generate_event_from_zone_status(driver, device, zone_status, zb_rx)
end

This function is unnecessary. Use generate_event_from_zone_status directly in the driver template for the IASZone.attributes.ZoneStatus.ID handler.

zigbee_test_utils.prepare_zigbee_env_info()

local function test_init()
test.mock_device.add_test_device(mock_device)
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
test.mock_device.add_test_device(mock_device)
test.mock_device.add_test_device(mock_device)

Comment on lines +10 to +13
if zone_status:is_alarm1_set() then
device:emit_event(capabilities.smokeDetector.smoke.detected())
elseif zone_status:is_alarm2_set() then
device:emit_event(capabilities.smokeDetector.smoke.tested())
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.

For ZoneStatus attribute bitmap, I see the following in the spec for bits that can be set:

Image

Is the alarm2 bit corresponding to the test functionality just the way the device works? Do we need to also be considering the test mode bit?

@cjswedes
Copy link
Copy Markdown
Contributor

All new files are executable, and should be updated to be only read/write

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.

3 participants