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

[Aqara] Smart Wall Switch(With Neutral, No Neutral) #963

Merged
merged 3 commits into from
Nov 2, 2023

Conversation

seojune79
Copy link
Contributor

fix routine condition error on child button of light switch

@github-actions
Copy link

github-actions bot commented Sep 18, 2023

Channel deleted.

@github-actions
Copy link

github-actions bot commented Sep 18, 2023

Test Results

     54 files     346 suites   0s ⏱️
1 619 tests 1 619 ✔️ 0 💤 0
2 846 runs  2 846 ✔️ 0 💤 0

Results for commit 3a268b3.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Sep 18, 2023

File Coverage
All files 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-dimmer-power-energy/init.lua 72%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-dimmer-power-energy/enbrighten-metering-dimmer/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara/version/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-switch-power/aurora-relay/init.lua 80%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/ge-link-bulb/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-metering-plug-power-consumption-report/init.lua 74%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/preferences.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/multi-switch-no-master/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/jasco/init.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/wallhero/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/aqara/multi-switch/init.lua 86%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-switch/src/zigbee-switch-power/vimar/init.lua 70%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 3a268b3

Comment on lines 84 to 89
elseif device.network_type == "DEVICE_EDGE_CHILD" then
device:emit_event(capabilities.button.supportedButtonValues({ "pushed" },
{ visibility = { displayed = false } }))
device:emit_event(capabilities.button.numberOfButtons({ value = 1 },
{ visibility = { displayed = false } }))
device:emit_event(capabilities.button.button.pushed({ state_change = false }))
Copy link
Contributor

Choose a reason for hiding this comment

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

just move the identical code from above outside of the if block

also write some tests to capture this behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I applied the changes you requested.

Copy link
Contributor

@greens greens left a comment

Choose a reason for hiding this comment

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

Actually, can you capture this behavior in a test, please?

@lelandblue lelandblue merged commit e2fdf7b into SmartThingsCommunity:main Nov 2, 2023
10 checks passed
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.

3 participants