Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Matter Switch: use parent-child for multi-switch devices #1011

Closed
wants to merge 1 commit into from

Conversation

ctowns
Copy link
Contributor

@ctowns ctowns commented Oct 10, 2023

@ctowns ctowns requested review from tpmanley and greens October 10, 2023 16:43
@ctowns ctowns force-pushed the CHAD-11858-matter-switch-parent-child branch from 0667ba4 to b0b3d30 Compare October 10, 2023 16:44
@ctowns ctowns requested a review from hubTab October 10, 2023 16:45
@github-actions
Copy link

github-actions bot commented Oct 10, 2023

File Coverage
All files 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/eve-energy/init.lua 91%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against b0b3d30

@github-actions
Copy link

github-actions bot commented Oct 10, 2023

Channel deleted.

@github-actions
Copy link

github-actions bot commented Oct 10, 2023

Test Results

     52 files  ±0     345 suites  +1   0s ⏱️ ±0s
1 622 tests ±0  1 619 ✔️  - 3  0 💤 ±0  0 ±0  3 🔥 +3 
2 842 runs  +3  2 839 ✔️ ±0  0 💤 ±0  0 ±0  3 🔥 +3 

For more details on these errors, see this check.

Results for commit b0b3d30. ± Comparison against base commit 38c1a61.

♻️ This comment has been updated with latest results.

{
type = "EDGE_CHILD",
label = name,
profile = "switch-binary",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to refer to this string by leveraging the fingerprint::deviceProfileName?

Copy link
Contributor

Choose a reason for hiding this comment

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

not available in the driver afaik

label = name,
profile = "switch-binary",
parent_device_id = device.id,
parent_assigned_child_key = string.format("%02X", ep),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a utility function available that, provided an ep, returns its formatted value, as It is being used throughout?

@ctowns
Copy link
Contributor Author

ctowns commented Oct 10, 2023

Running into some issues with testing and need to do some more clean up, but the plan is now to not get this in for the beta deploy today and instead target end of the week.

initialize_switch(device)
if device.network_type == device_lib.NETWORK_TYPE_MATTER then
device:set_component_to_endpoint_fn(component_to_endpoint)
device:set_endpoint_to_component_fn(endpoint_to_component)
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't see endpoint_to_component's new definition anywhere

clusters.OnOff.attributes.OnOff:build_test_report_data(mock_device, 3, true)
}
},
{
Copy link
Contributor

Choose a reason for hiding this comment

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

whitespace

@lelandblue
Copy link
Contributor

What is the status of this PR is it still needed?

@ctowns
Copy link
Contributor Author

ctowns commented Jan 10, 2024

This was merged here: #1094

@ctowns ctowns closed this Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants