Skip to content

WWSTCERT-11943 Added support for Bosch Motion Detector II [+M]#2555

Merged
KKlimczukS merged 8 commits into
SmartThingsCommunity:mainfrom
JanJakubiszyn:Bosch_motion_sensor_support
Jun 12, 2026
Merged

WWSTCERT-11943 Added support for Bosch Motion Detector II [+M]#2555
KKlimczukS merged 8 commits into
SmartThingsCommunity:mainfrom
JanJakubiszyn:Bosch_motion_sensor_support

Conversation

@JanJakubiszyn

Copy link
Copy Markdown
Contributor

Check all that apply

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • [x ] I have reviewed the README.md file
      • [ x] I have reviewed the CODE_OF_CONDUCT.md file
      • [ x] 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
  • [ x] Refactor

Checklist

  • [ x] 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

github-actions Bot commented Nov 14, 2025

Copy link
Copy Markdown

Duplicate profile check: Passed - no duplicate profiles detected.

@github-actions

github-actions Bot commented Nov 14, 2025

Copy link
Copy Markdown

Channel deleted.

@github-actions

github-actions Bot commented Nov 14, 2025

Copy link
Copy Markdown

Test Results

   73 files  ±0    515 suites  ±0   0s ⏱️ ±0s
2 904 tests ±0  2 904 ✅ +1  0 💤 ±0  0 ❌  - 1 
4 800 runs  ±0  4 800 ✅ +1  0 💤 ±0  0 ❌  - 1 

Results for commit f131705. ± Comparison against base commit 42a6a23.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Nov 14, 2025

Copy link
Copy Markdown

File Coverage
All files 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/embedded_cluster_utils.lua 38%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/attribute_handlers.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/capability_handlers.lua 84%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/event_handlers.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/attribute_handlers.lua 80%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_mk1/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua 87%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua 93%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against f131705

@greens greens changed the title Added support for Bosch matter motion sensor WWSTCERT-9109 Added support for Bosch matter motion sensor Nov 24, 2025
Comment thread drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua Outdated
@hcarter-775

Copy link
Copy Markdown
Contributor

Has this been tested on-device?

@JanJakubiszyn JanJakubiszyn force-pushed the Bosch_motion_sensor_support branch from f1676a1 to 0723d13 Compare November 27, 2025 15:03
@JanJakubiszyn

JanJakubiszyn commented Nov 27, 2025

Copy link
Copy Markdown
Contributor Author

Has this been tested on-device?

Yes, I have tested it with the device and it works well.

I have implemented all of the mentioned changes from the review.

Thank You!

@greens

greens commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

@JanJakubiszyn You'll need to rebase your changes.

@JanJakubiszyn JanJakubiszyn force-pushed the Bosch_motion_sensor_support branch from 6ca7abe to 23045f1 Compare December 8, 2025 13:02
@JanJakubiszyn

Copy link
Copy Markdown
Contributor Author

@JanJakubiszyn You'll need to rebase your changes.

All done.

@JanJakubiszyn JanJakubiszyn force-pushed the Bosch_motion_sensor_support branch from 0b18bd6 to 98408c7 Compare December 19, 2025 15:30
@JanJakubiszyn

Copy link
Copy Markdown
Contributor Author

Hi @hcarter-775, @greens,

  • To fix the an issue with default 70% dim value after sending the "on" command I have added the "OnLevel" attribute change (WWST-10126)
  • I also added refresh after the info_changed function is triggered. It has been done to increase the speed of the temperature update after temperature_offset preference is changed.

Please let me know if I should proceed with editing the rest of the unit tests accordingly or should I take a different approach.

@greens

greens commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

Looks like this has fallen out of date again

@JanJakubiszyn JanJakubiszyn force-pushed the Bosch_motion_sensor_support branch from 352509c to a7599b5 Compare January 22, 2026 15:37
@greens

greens commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Your changes seem to have led to tests failing.

@JanJakubiszyn JanJakubiszyn force-pushed the Bosch_motion_sensor_support branch from a7599b5 to a7615c3 Compare January 26, 2026 12:36
@JanJakubiszyn

Copy link
Copy Markdown
Contributor Author

Your changes seem to have led to tests failing.

Hi @greens , I've fixed the failing test.

Comment thread drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua Outdated
Comment thread drivers/SmartThings/matter-switch/src/init.lua Outdated
Comment thread drivers/SmartThings/matter-switch/src/init.lua Outdated
@JanJakubiszyn JanJakubiszyn force-pushed the Bosch_motion_sensor_support branch 2 times, most recently from 27e7e25 to aaf0609 Compare January 27, 2026 15:43

@hcarter-775 hcarter-775 left a comment

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.

other than these last edge-case nits, this lgtm. Thanks for the prompt responses!

Comment thread drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua Outdated
Comment thread drivers/SmartThings/matter-switch/src/init.lua Outdated
Comment thread drivers/SmartThings/matter-switch/src/init.lua Outdated
@JanJakubiszyn

Copy link
Copy Markdown
Contributor Author

@hcarter-775, I've applied your suggestions. Thanks!

@hcarter-775

Copy link
Copy Markdown
Contributor

@JanJakubiszyn sweet, this lgtm. Now we just have to fix the unit tests that have broken (probably due to the extra preference gating you introduced?)

@JanJakubiszyn JanJakubiszyn force-pushed the Bosch_motion_sensor_support branch 2 times, most recently from 78cf6fe to 5bcda22 Compare January 27, 2026 17:25
@JanJakubiszyn

Copy link
Copy Markdown
Contributor Author

@JanJakubiszyn sweet, this lgtm. Now we just have to fix the unit tests that have broken (probably due to the extra preference gating you introduced?)

Done. Everything should be good now.

@hcarter-775

Copy link
Copy Markdown
Contributor

Hey @JanJakubiszyn , can you pull the preference stuff you've added into a separate PR? Then we can push that forward this week without the WWST stuff. cc: @nickolas-deboom

# Conflicts:
#	drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua
#	drivers/SmartThings/matter-switch/src/switch_utils/fields.lua
… name and capability order, edit of the match_profile's condition

# Conflicts:
#	drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua

# Conflicts:
#	drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua
@JanJakubiszyn JanJakubiszyn force-pushed the Bosch_motion_sensor_support branch from 5bcda22 to 90ed999 Compare January 28, 2026 13:38
@JanJakubiszyn

Copy link
Copy Markdown
Contributor Author

Hey @JanJakubiszyn , can you pull the preference stuff you've added into a separate PR? Then we can push that forward this week without the WWST stuff. cc: @nickolas-deboom

Hi @hcarter-775, I have transferred the offset reading to another PR - #2737

@KKlimczukS KKlimczukS changed the title WWSTCERT-9109 Added support for Bosch matter motion sensor WWSTCERT-11925 Added support for Bosch Motion Detector II [+M] May 26, 2026
@KKlimczukS KKlimczukS changed the title WWSTCERT-11925 Added support for Bosch Motion Detector II [+M] WWSTCERT-11943 Added support for Bosch Motion Detector II [+M] May 27, 2026
@KKlimczukS KKlimczukS requested review from cbaumler and hcarter-775 and removed request for greens May 27, 2026 08:07
@cbaumler cbaumler requested a review from ctowns May 27, 2026 16:17
@cbaumler

cbaumler commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Hi @JanJakubiszyn, it looks like this PR branch is out of date with main. Could you update it with the latest main? Then @hcarter-775 can re-review.

@cbaumler

cbaumler commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Hi @JanJakubiszyn, it looks like there are test failures being reported by CI.

Comment on lines +11 to +18
- id: switch
version: 1
- id: switchLevel
version: 1
config:
values:
- key: "level.value"
range: [1, 100]

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.

To keep profile consistency, these should be the first two listed capabilities.

The third should be one that is currently unlisted, i.e.

  - id: statelessSwitchLevelStep
    version: 1

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.

@hcarter-775 device profile re-arranged

- name: MotionSensor
preferences:
- preferenceId: tempOffset
explicit: true 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.

add newline

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.

done

@KKlimczukS KKlimczukS requested a review from hcarter-775 June 11, 2026 08:45

@hcarter-775 hcarter-775 left a comment

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.

LGTM

@KKlimczukS KKlimczukS merged commit 614a284 into SmartThingsCommunity:main Jun 12, 2026
14 of 17 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