Skip to content

Conversation

HunsupJung
Copy link
Collaborator

@HunsupJung HunsupJung commented Oct 1, 2025

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

This PR is for supporting Routine of robotCleanerOperatingState Capability and includes follows.

  1. Variables used in duplicate were changed to global variables.
  2. rvc_operational_state_list_attr_handler has been added to support Condition of Routine.
  3. handle_rvc_operational_state_accepted_command_list has been updated to update supportedCommands
  4. driverSwitched has been added to execute handle_rvc_operational_state_accepted_command_list after updating driver.

Summary of Completed Tests

Copy link

github-actions bot commented Oct 1, 2025

Copy link

github-actions bot commented Oct 1, 2025

Test Results

   71 files    455 suites   0s ⏱️
2 337 tests 2 337 ✅ 0 💤 0 ❌
3 959 runs  3 959 ✅ 0 💤 0 ❌

Results for commit 9ce965f.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Oct 1, 2025

File Coverage
All files NaN%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 9ce965f

@HunsupJung HunsupJung force-pushed the feature/update-rvc-routine branch from 388bea7 to 9ce965f Compare October 13, 2025 12:20
@@ -0,0 +1,108 @@
name: Robot Cleaner Operating State
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @HunsupJung why do we need this capability to be embedded? It appears the same capability def is already deployed in production

local supportedOperatingState = {}
for _, state in ipairs(ib.data.elements) do
if OPERATING_STATE_MAP[state.elements.operational_state_id.value] ~= nil then
table.insert(supportedOperatingState, OPERATING_STATE_MAP[state.elements.operational_state_id.value].NAME)
Copy link
Contributor

Choose a reason for hiding this comment

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

does this require an augment type() call for lower lua lib integration?

for _, attr in ipairs(ib.data.elements) do
table.insert(supportedOperatingStateCommands, OP_COMMAND_MAP[attr.value].NAME)
end
device:set_field(OPERATING_STATE_SUPPORTED_COMMANDS, supportedOperatingStateCommands, { persist = true })
Copy link
Contributor

Choose a reason for hiding this comment

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

do we still need this table given the introduction of supportedCommands? It seems to me like the one use of it can be replaced with the capability get_latest_state api?

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.

2 participants