Matter Switch move button and switch initialization to doConfigure#2041
Merged
Conversation
|
Channel deleted. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against ea1236c |
951333e to
d2843e6
Compare
Contributor
|
I found this line: -- The resulting endpoint to component map is saved in the COMPONENT_TO_ENDPOINT_MAP_BUTTON field |
hcarter-775
reviewed
Apr 2, 2025
hcarter-775
reviewed
Apr 2, 2025
ctowns
reviewed
Apr 3, 2025
ctowns
reviewed
Apr 3, 2025
ctowns
reviewed
Apr 3, 2025
ctowns
reviewed
Apr 3, 2025
hcarter-775
reviewed
Apr 3, 2025
Contributor
Author
Good catch! Fixed in latest commit |
2879761 to
7b5daf1
Compare
hcarter-775
reviewed
May 2, 2025
hcarter-775
approved these changes
May 2, 2025
cbaa7b4 to
1d46a97
Compare
nickolas-deboom
commented
May 8, 2025
ctowns
reviewed
May 8, 2025
ctowns
reviewed
May 8, 2025
nickolas-deboom
added a commit
that referenced
this pull request
May 9, 2025
With the changes from #2041, the matter-switch subdrivers should be updated to maintain consistency. This involves: * Moving the initialization code from device_init into do_configure * Implement the driverSwitched lifecycle event * Additionally, improve the lifecycle event testing for the Aqara subdriver, removing the `TEST_CONFIGURE` field and instead leveraging a technique used in other test files to set `device.profile.id` for a mock device.
nickolas-deboom
added a commit
that referenced
this pull request
May 9, 2025
With the changes from #2041, the matter-switch subdrivers should be updated to maintain consistency. This involves: * Moving the initialization code from device_init into do_configure * Implement the driverSwitched lifecycle event * Additionally, improve the lifecycle event testing for the Aqara subdriver, removing the `TEST_CONFIGURE` field and instead leveraging a technique used in other test files to set `device.profile.id` for a mock device.
12 tasks
nickolas-deboom
added a commit
that referenced
this pull request
May 9, 2025
With the changes from #2041, the matter-switch subdrivers should be updated to maintain consistency. This involves: * Moving the initialization code from device_init into do_configure * Implement the driverSwitched lifecycle event * Additionally, improve the lifecycle event testing for the Aqara subdriver, removing the `TEST_CONFIGURE` field and instead leveraging a technique used in other test files to set `device.profile.id` for a mock device.
ea07e1b to
653030b
Compare
ctowns
approved these changes
May 12, 2025
This change moves the initialization logic for buttons and switches to doConfigure. This keeps all of the profile selection logic all within doConfigure and allows the removal of logic gates from device_init that were there to ensure init code only ran one time. Also added is a new function that runs at init that can rename or delete persisted fields on the device.
653030b to
ea1236c
Compare
nickolas-deboom
added a commit
that referenced
this pull request
May 13, 2025
With the changes from #2041, the matter-switch subdrivers should be updated to maintain consistency. This involves: * Moving the initialization code from device_init into do_configure * Implement the driverSwitched lifecycle event * Additionally, improve the lifecycle event testing for the Aqara subdriver, removing the `TEST_CONFIGURE` field and instead leveraging a technique used in other test files to set `device.profile.id` for a mock device.
nickolas-deboom
added a commit
that referenced
this pull request
Jun 17, 2025
With the changes from #2041, the matter-switch subdrivers should be updated to maintain consistency. This involves: * Moving the initialization code from device_init into do_configure * Implement the driverSwitched lifecycle event * Additionally, improve the lifecycle event testing for the Aqara subdriver, removing the `TEST_CONFIGURE` field and instead leveraging a technique used in other test files to set `device.profile.id` for a mock device.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Checklist
Description of Change
This change moves the initialization logic for buttons and switches to
do_configure. This consolidates all of the profile selection logic to be within doConfigure and allows the removal of logic gates fromdevice_initthat were there to ensure init code only ran one time.Also added is a new function that runs at init that can rename or delete persisted fields on the device. The original
__component_to_endpoint_mapfield can now be utilized by buttons and other devices becauseinitialize_buttons_and_switchesis ensured to only run one time, meaning that old MCD switch devices will not be affected. Also, the__switch_intializedfield can now be deleted from devices.Summary of Completed Tests
Tested with various matter buttons and lights to ensure no change in behavior.