-
Notifications
You must be signed in to change notification settings - Fork 498
Matter Switch move button and switch initialization to doConfigure #2041
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
Conversation
Channel deleted. |
Minimum allowed coverage is Generated by 🐒 cobertura-action against ea1236c |
951333e
to
d2843e6
Compare
I found this line: -- The resulting endpoint to component map is saved in the COMPONENT_TO_ENDPOINT_MAP_BUTTON field |
Good catch! Fixed in latest commit |
2879761
to
7b5daf1
Compare
cbaa7b4
to
1d46a97
Compare
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.
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.
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
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
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.
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.
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_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. The original
__component_to_endpoint_map
field can now be utilized by buttons and other devices becauseinitialize_buttons_and_switches
is ensured to only run one time, meaning that old MCD switch devices will not be affected. Also, the__switch_intialized
field can now be deleted from devices.Summary of Completed Tests
Tested with various matter buttons and lights to ensure no change in behavior.