-
Notifications
You must be signed in to change notification settings - Fork 486
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
Adding support for frient Intelligent Smoke Alarm (SMSZB-120) #2024
base: main
Are you sure you want to change the base?
Adding support for frient Intelligent Smoke Alarm (SMSZB-120) #2024
Conversation
Hey @GAFfrient. We will begin a review of this PR. When you have a free moment, please sign the required Contributors License Agreement #2024 (comment) |
Duplicate profile check: Passed - no duplicate profiles detected. |
Invitation URL: |
Test Results 66 files 421 suites 0s ⏱️ Results for commit a54d9c4. ♻️ This comment has been updated with latest results. |
Minimum allowed coverage is Generated by 🐒 cobertura-action against a54d9c4 |
Hello. Now I did :) |
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leave this in place, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the latest commit.
NAME = "Freint Smoke Detector", | ||
local function do_configure(self, device) | ||
device:configure() | ||
device:send(TemperatureMeasurement.server.attributes.MeasuredValue:configure_reporting(device, 60, 600, 100):to_endpoint(0x26)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use add_configured_attribute
in the init
handler. (example here: https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/blob/main/drivers/SmartThings/zigbee-dimmer-remote/src/init.lua#L30)
this will ensure the configure_reporting message is sent by device:configure
as well as creates a binding to the TemperatureMeasurement
cluster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the latest commit.
supported_capabilities = { | ||
alarm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this field doesn't do anything for sub-drivers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the latest commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd like to see some tests covering the new behavior.
Unit tests added in the latest commit. |
@@ -1,4 +1,4 @@ | |||
-- Copyright 2022 SmartThings | |||
-- Copyright 2025 SmartThings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please leave the copyright date as-is
local frient_smoke_detector = { | ||
NAME = "Freint Smoke Detector", | ||
local function generate_event_from_zone_status(driver, device, zone_status, zigbee_message) | ||
print("Received ZoneStatus:", zone_status.value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this print
statement, or change it to a log
message
device:emit_event(smokeDetector.smoke.detected()) | ||
else | ||
device.thread:call_with_delay(6, function () | ||
print("Smoke cleared!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same with these
Check all that apply
Type of Change
Checklist
Description of Change
Summary of Completed Tests