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 Wireless Remote Switch E1 (Single Rocker) #1249

Merged
merged 5 commits into from
Mar 25, 2024

Conversation

Hongming6
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Feb 29, 2024

Channel deleted.

Copy link

github-actions bot commented Feb 29, 2024

Test Results

   56 files    360 suites   0s ⏱️
1 723 tests 1 723 ✅ 0 💤 0 ❌
3 003 runs  3 003 ✅ 0 💤 0 ❌

Results for commit 7134dc0.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Feb 29, 2024

File Coverage
All files 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/zigbee-multi-button/somfy/somfy_situo_4.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/zigbee-multi-button/ikea/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/zigbee-multi-button/ikea/TRADFRI_remote_control.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/zigbee-multi-button/shinasystems/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/iris/init.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/zigbee-multi-button/ecosmart/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/zigbee-multi-button/SLED/init.lua 66%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/zigbee-multi-button/heiman/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/zigbee-multi-button/wallhero/init.lua 87%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/button_utils.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/zigbee-multi-button/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/zigbee-multi-button/supported_values.lua 99%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/frient/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/zigbee-multi-button/robb/init.lua 99%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-button/src/zigbee-multi-button/adurosmart/init.lua 98%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against a60c69c

test.mock_device.add_test_device(mock_device_t1)
end

test.set_test_init_function(test_init)

test.register_coroutine_test(
"Handle added lifecycle",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Handle added lifecycle",
"Handle added lifecycle -- e1",

Comment on lines 100 to 101


Copy link
Contributor

Choose a reason for hiding this comment

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

nit: extra whitespace

}


Copy link
Contributor

Choose a reason for hiding this comment

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

nit: extra whitespace

Comment on lines 24 to 25
local PRIVATE_ATTRIBUTE_ID = 0x0009
local PRIVATE_SWITCH_MODE_ATTRIBUTE_ID = 0x0125
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
local PRIVATE_ATTRIBUTE_ID = 0x0009
local PRIVATE_SWITCH_MODE_ATTRIBUTE_ID = 0x0125
local PRIVATE_ATTRIBUTE_ID_T1 = 0x0009
local PRIVATE_ATTRIBUTE_ID_E1 = 0x0125

Copy link
Contributor Author

@Hongming6 Hongming6 Mar 15, 2024

Choose a reason for hiding this comment

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

Thank you, I have modified!

@@ -1,3 +1,4 @@
---@diagnostic disable: param-type-mismatch, missing-parameter
Copy link
Contributor

Choose a reason for hiding this comment

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

remove

Comment on lines +85 to +91
if device:get_model() == "lumi.remote.b1acn02" then
device:send(cluster_base.write_manufacturer_specific_attribute(device,
PRIVATE_CLUSTER_ID, PRIVATE_ATTRIBUTE_ID_T1, MFG_CODE, data_types.Uint8, 1))
elseif device:get_model() == "lumi.remote.acn003" then
device:send(cluster_base.write_manufacturer_specific_attribute(device,
PRIVATE_CLUSTER_ID, PRIVATE_ATTRIBUTE_ID_E1, MFG_CODE, data_types.Uint8, 2))
end
Copy link
Contributor

Choose a reason for hiding this comment

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

a comment indicating what these both do would be helpful

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok,when the wireless switch T1 accesses the network, the gateway sends private attribute 0009 to make the device no longer distinguish between the standard gateway and the aqara gateway. When wireless switch E1 is connected to the network, the gateway delivers private attribute 0125 to enable the device to send double-click and long-press packets. Wireless switch T1 supports double and long press by default, while wireless switch E1 does not distinguish between standard gateway and aqara gateway by default. This is the point where they issue different instructions when they enter the network.

@lelandblue lelandblue merged commit 287fb8a into SmartThingsCommunity:main Mar 25, 2024
8 of 9 checks passed
Copy link

@greens
Copy link
Contributor

greens commented Mar 25, 2024

Checking drivers/SmartThings/zigbee-button/src/aqara/init.lua 4 warnings

    drivers/SmartThings/zigbee-button/src/aqara/init.lua:92:75: (W614) trailing whitespace in a comment
    drivers/SmartThings/zigbee-button/src/aqara/init.lua:93:71: (W614) trailing whitespace in a comment
    drivers/SmartThings/zigbee-button/src/aqara/init.lua:94:59: (W614) trailing whitespace in a comment
    drivers/SmartThings/zigbee-button/src/aqara/init.lua:95:78: (W614) trailing whitespace in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants