-
Notifications
You must be signed in to change notification settings - Fork 494
Matter Appliance minor refactor #2181
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
base: main
Are you sure you want to change the base?
Conversation
This change moves some common functionality into common-utils.lua, implements do_configure in the subdrivers rather than the main driver, and also contains some minor fixes involving embedded clusters.
Invitation URL: |
Minimum allowed coverage is Generated by 🐒 cobertura-action against de08bae |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice job. seems very necessary 👍
increase test coverage, test doConfigure setpoint limit reads, and move laundry washer test cases to a new test file
The attribute and capability handlers related to temperature are common across the subdrivers that use them and can be moved into the main driver. A few helper functions were moved into the common module so that they can be used by the main driver and sub drivers.
c7d7de2
to
800f694
Compare
I made an update to move some of the temperature attribute and capability handlers into the main driver and remove them from the subdrivers because these have the same behavior in all cases. I left |
Use `check_field_name_updates`, previously implemented in matter-switch, to update "__supported_temperature_levels", previously used in matter-laundry and matter-dishwasher, to "__supported_temperature_levels_map", which is now used in every subdriver.
@@ -0,0 +1,187 @@ | |||
-- Copyright 2024 SmartThings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved these test cases into their own file in order to properly test the doConfigure logic in test_init
Type of Change
Checklist
Description of Change
This change moves some common functionality into common-utils.lua, implements do_configure in the subdrivers rather than the main driver, and also contains some minor fixes involving embedded clusters.
Summary of Completed Tests