Add BITUO TECHNIK OEM devices for the Zemismart manufacturer#2986
Conversation
|
Channel deleted. |
Test Results 73 files + 1 515 suites +4 0s ⏱️ ±0s Results for commit ccb6da2. ± Comparison against base commit 3015ace. This pull request removes 2 and adds 33 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against ccb6da2 |
cjswedes
left a comment
There was a problem hiding this comment.
LGTM, just a few formatting changes needed
There was a problem hiding this comment.
Please add the copywrite header to the new test files
| end | ||
| ) | ||
|
|
||
| test.run_registered_tests() No newline at end of file |
There was a problem hiding this comment.
nit: please have a trailing newline at the end of each of the test files
| test.register_message_test( | ||
| "ActivePower Report should be handled. Sensor value is in W, capability attribute value is in hectowatts", | ||
| { | ||
| { | ||
| channel = "zigbee", | ||
| direction = "receive", | ||
| message = { mock_device.id, ElectricalMeasurement.attributes.ActivePower:build_test_attr_report(mock_device, | ||
| 27) }, | ||
| }, | ||
| { | ||
| channel = "capability", | ||
| direction = "send", | ||
| message = mock_device:generate_test_message("PhaseA", capabilities.powerMeter.power({ value = 27.0, unit = "W" })) | ||
| } | ||
| } | ||
| ) |
There was a problem hiding this comment.
Identical test can be removed.
| test.register_message_test( | |
| "ActivePower Report should be handled. Sensor value is in W, capability attribute value is in hectowatts", | |
| { | |
| { | |
| channel = "zigbee", | |
| direction = "receive", | |
| message = { mock_device.id, ElectricalMeasurement.attributes.ActivePower:build_test_attr_report(mock_device, | |
| 27) }, | |
| }, | |
| { | |
| channel = "capability", | |
| direction = "send", | |
| message = mock_device:generate_test_message("PhaseA", capabilities.powerMeter.power({ value = 27.0, unit = "W" })) | |
| } | |
| } | |
| ) |
| end | ||
| end | ||
| if string.find(device:get_model(), "SPM02") or string.find(device:get_model(), "SDM01W") then | ||
| if string.find(device:get_model(), "SPM02") or string.find(device:get_model(), "SDM01W") or string.find(device:get_model(), "SDM01-3Z1", 1, true)then |
There was a problem hiding this comment.
| if string.find(device:get_model(), "SPM02") or string.find(device:get_model(), "SDM01W") or string.find(device:get_model(), "SDM01-3Z1", 1, true)then | |
| if string.find(device:get_model(), "SPM02") or string.find(device:get_model(), "SDM01W") or string.find(device:get_model(), "SDM01-3Z1", 1, true) then |
|
@cjswedes it looks like the formatting changes have been addressed. Could you give this a final review? |
Check all that apply
Type of Change
Checklist
Description of Change
Add BITUO TECHNIK OEM devices for the Zemismart manufacturer.
Summary of Completed Tests
test_zigbee_power_meter_1p_ZM
test_zigbee_power_meter_2p_ZM
test_zigbee_power_meter_3p_ZM