add MultiIR Smart button MIR-SO100#2862
add MultiIR Smart button MIR-SO100#2862thinkaName wants to merge 1 commit intoSmartThingsCommunity:mainfrom
Conversation
|
Invitation URL: |
Test Results 72 files 500 suites 0s ⏱️ Results for commit 5804f79. ♻️ This comment has been updated with latest results. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 5804f79 |
|
|
||
| zigbee_test_utils.prepare_zigbee_env_info() | ||
| local function test_init() | ||
| test.mock_device.add_test_device(mock_device)end |
| local function added_handler(self, device) | ||
| device:emit_event(capabilities.button.supportedButtonValues({"pushed","double","held"}, {visibility = { displayed = false }})) | ||
| device:emit_event(capabilities.button.numberOfButtons({value = 1}, {visibility = { displayed = false }})) | ||
| button_utils.emit_event_if_latest_state_missing(device, "main", capabilities.button, capabilities.button.button.NAME, capabilities.button.button.pushed({state_change = false})) | ||
| end | ||
|
|
||
| local MultiIR_Emergency_Button = { | ||
| NAME = "MultiIR Emergency Button", | ||
| lifecycle_handlers = { | ||
| added = added_handler, |
There was a problem hiding this comment.
You can delete the added_handler function and use ours defined here. If the device doesn't support the TemperatureMeasurement cluster, then it will functionally be the same and simplify the driver.
| test.socket.capability:__expect_send( | ||
| mock_device:generate_test_message( | ||
| "main", | ||
| capabilities.button.supportedButtonValues({ "pushed","double","held" }, { visibility = { displayed = false } }) |
There was a problem hiding this comment.
| capabilities.button.supportedButtonValues({ "pushed","double","held" }, { visibility = { displayed = false } }) | |
| capabilities.button.supportedButtonValues({ "pushed","held","double" }, { visibility = { displayed = false } }) |
To line up with our default added_handler
| test.socket.capability:__expect_send( | ||
| mock_device:generate_test_message( | ||
| "main", | ||
| capabilities.button.supportedButtonValues({ "pushed","double","held" }, { visibility = { displayed = false } }) |
There was a problem hiding this comment.
| capabilities.button.supportedButtonValues({ "pushed","double","held" }, { visibility = { displayed = false } }) | |
| capabilities.button.supportedButtonValues({ "pushed","held","double" }, { visibility = { displayed = false } }) |
To line up with our default added_handler
090ac00 to
5804f79
Compare
|
|
||
| local zcl_clusters = require "st.zigbee.zcl.clusters" | ||
| local capabilities = require "st.capabilities" | ||
| local button_utils = require "button_utils" |
There was a problem hiding this comment.
luacheck: Remove this and it should be good to go
|
|
||
| local IASZone = clusters.IASZone | ||
|
|
||
| local button_attr = capabilities.button.button |
There was a problem hiding this comment.
luacheck: Remove this line
Check all that apply
Type of Change
Checklist
Description of Change
Summary of Completed Tests