Skip to content

Conversation

@hcarter-775
Copy link
Contributor

@hcarter-775 hcarter-775 commented Dec 12, 2025

Description of Change

Add support for fan/light devices as parent/child

Summary of Completed Tests

Unit tests updated, tested on-device

@github-actions
Copy link

Duplicate profile check: Passed - no duplicate profiles detected.

@hcarter-775 hcarter-775 requested review from ctowns and greens December 12, 2025 22:33
@github-actions
Copy link

github-actions bot commented Dec 12, 2025

Channel deleted.

@github-actions
Copy link

github-actions bot commented Dec 12, 2025

Test Results

   71 files    480 suites   0s ⏱️
2 485 tests 2 485 ✅ 0 💤 0 ❌
4 267 runs  4 267 ✅ 0 💤 0 ❌

Results for commit d291eb7.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 12, 2025

File Coverage
All files 92%
/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/camera/camera_utils/utils.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua 88%
/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/switch_utils/utils.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/fields.lua 99%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua 85%
/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/aqara_cube/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/init.lua 97%
/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 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua 89%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/capability_handlers.lua 78%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/attribute_handlers.lua 95%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against d291eb7

@hcarter-775 hcarter-775 force-pushed the support/fan-child-devices branch from 80239d5 to fda9ae0 Compare January 7, 2026 22:03
Comment on lines +230 to +271
local fan_device_type_ep_ids = switch_utils.get_endpoints_by_device_type(device, fields.DEVICE_TYPE_ID.FAN)
if #fan_device_type_ep_ids > 0 then
updated_profile, optional_component_capabilities = FanDeviceConfiguration.assign_profile_for_fan_ep(device, default_endpoint_id)
device:set_field(fields.MODULAR_PROFILE_UPDATED, true)
end
Copy link
Contributor

@nickolas-deboom nickolas-deboom Jan 8, 2026

Choose a reason for hiding this comment

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

For now this is perfectly fine, but it might be worth discussing alternate approaches for the default endpoint logic at some point. Because at this point we already know the default endpoint contains a fan device type so it seems like we shouldn't need the get_endpoints_by_device_type call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed

@nickolas-deboom
Copy link
Contributor

One more thing I thought of - wasn't there a switch/fan device out there as well? Should we add support for that in this PR?

@hcarter-775
Copy link
Contributor Author

hcarter-775 commented Jan 8, 2026

@nickolas-deboom any WWST request would be done in a separate PR in my mind. Also, I believe that manufacturer re-tested the device with this current PR and liked the result, category and all

@hcarter-775 hcarter-775 force-pushed the support/fan-child-devices branch from a5ce6e0 to bec20ae Compare January 8, 2026 21:04
@hcarter-775 hcarter-775 force-pushed the support/fan-child-devices branch from 9fc4ae4 to a33c57b Compare January 8, 2026 22:49
@hcarter-775 hcarter-775 merged commit fb951ee into main Jan 8, 2026
12 checks passed
@hcarter-775 hcarter-775 deleted the support/fan-child-devices branch January 8, 2026 22:56
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