Skip to content

Required changes in the driver for Door/Window Contact II [M] device #2055

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 0 commits into from

Conversation

JanJakubiszyn
Copy link
Contributor

WWSTCERT-5977 driver adjustments

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

Creating a sub-driver which handles button functionality for Bosch Door/Window Contact II [M] device.

Summary of Completed Tests

Manual tests of button capability.

Copy link

github-actions bot commented Apr 8, 2025

Copy link

github-actions bot commented Apr 8, 2025

Test Results

   66 files  ±0    420 suites  ±0   0s ⏱️ ±0s
2 164 tests ±0  2 164 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 685 runs  ±0  3 685 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 523a4d3. ± Comparison against base commit 7397af4.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 8, 2025

File Coverage
All files 84%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/air-quality-sensor/init.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/embedded-cluster-utils.lua 45%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/BoschButtonContact/init.lua 44%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/smoke-co-alarm/init.lua 83%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/init.lua 91%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 523a4d3

@CLAassistant
Copy link

CLAassistant commented Apr 8, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

github-actions bot commented Apr 9, 2025

Duplicate profile check: Passed - no duplicate profiles detected.

@@ -0,0 +1,160 @@
-- Copyright 2022 SmartThings
Copy link
Contributor

Choose a reason for hiding this comment

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

date

Copy link
Contributor

Choose a reason for hiding this comment

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

in general, folder names are lowercase and hyphenated, e.g.: bosch-button-contact

@greens
Copy link
Contributor

greens commented Apr 9, 2025

@JanJakubiszyn I would add the fingerprints back and I will close my PR (#2049) in favor of this one.

@@ -52,6 +52,8 @@ local TEMP_BOUND_RECEIVED = "__temp_bound_received"
local TEMP_MIN = "__temp_min"
local TEMP_MAX = "__temp_max"

local HUE_MANUFACTURER_ID = 0x100B
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove this Hue specific handling- it has recently been taken out of the drivers.


local function is_bosch_open_close_button(opts, driver, device)
if device.network_type == device_lib.NETWORK_TYPE_MATTER and
device.manufacturer_info.vendor_id == BOSCH_VENDOR_ID then
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the product id also be checked here?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants