Skip to content

WWSTCERT-10511/WWSTCERT-10514 Add support to frient smoke co sensor#2776

Open
marcintyminski wants to merge 9 commits intoSmartThingsCommunity:mainfrom
marcintyminski:add-support-to-frient-smoke-co-sensor
Open

WWSTCERT-10511/WWSTCERT-10514 Add support to frient smoke co sensor#2776
marcintyminski wants to merge 9 commits intoSmartThingsCommunity:mainfrom
marcintyminski:add-support-to-frient-smoke-co-sensor

Conversation

@marcintyminski
Copy link
Contributor

Check all that apply

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • New feature
  • Refactor

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have verified my changes by testing with a device or have communicated a plan for testing
  • I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

Description of Change

Summary of Completed Tests

@github-actions
Copy link

Duplicate profile check: Passed - no duplicate profiles detected.

@github-actions
Copy link

@github-actions
Copy link

github-actions bot commented Feb 13, 2026

Test Results

   72 files    487 suites   0s ⏱️
2 547 tests 2 547 ✅ 0 💤 0 ❌
4 362 runs  4 362 ✅ 0 💤 0 ❌

Results for commit 4123a75.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 13, 2026

File Coverage
All files 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-carbon-monoxide-detector/src/lazy_load_subdriver.lua 57%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-carbon-monoxide-detector/src/frient/init.lua 93%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 4123a75

@KKlimczukS KKlimczukS requested a review from greens February 27, 2026 11:47
@@ -0,0 +1,15 @@
-- Copyright 2025 SmartThings, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

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

should be 2026, I think

Comment on lines +123 to +125
local function do_refresh(driver, device)
device:refresh()
end
Copy link
Contributor

Choose a reason for hiding this comment

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

not needed

Comment on lines +34 to +41
{
cluster = IASZone.ID,
attribute = IASZone.attributes.ZoneStatus.ID,
minimum_interval = 0,
maximum_interval = 300,
data_type = IASZone.attributes.ZoneStatus.base_type,
reportable_change = 1
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't seem necessary to overwrite the default config here

end

local function ias_zone_status_attr_handler(driver, device, zone_status, zb_rx)
generate_event_from_zone_status(driver, device, zone_status, zb_rx)
Copy link
Contributor

Choose a reason for hiding this comment

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

you can just use generate_event_from_zone_status rather than creating this extra function

local input = device.preferences.maxWarningDuration
device:send(IASWD.attributes.MaxDuration:write(device, input))
end
if (name == "temperatureSensitivity") then
Copy link
Contributor

Choose a reason for hiding this comment

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

should be an elseif

Comment on lines +4 to +26
local capabilities = require "st.capabilities"
local zcl_clusters = require "st.zigbee.zcl.clusters"
local data_types = require "st.zigbee.data_types"
local IASZone = zcl_clusters.IASZone
local CarbonMonoxideCluster = zcl_clusters.CarbonMonoxide
local carbonMonoxide = capabilities.carbonMonoxideDetector
local CarbonMonoxideEndpoint = 0x2E
local SmokeAlarmEndpoint = 0x23
local TemperatureMeasurement = zcl_clusters.TemperatureMeasurement
local TEMPERATURE_ENDPOINT = 0x26
local alarm = capabilities.alarm
local smokeDetector = capabilities.smokeDetector
local IASWD = zcl_clusters.IASWD
local carbonMonoxideMeasurement = capabilities.carbonMonoxideMeasurement
local tamperAlert = capabilities.tamperAlert
local SirenConfiguration = IASWD.types.SirenConfiguration
local battery_defaults = require "st.zigbee.defaults.battery_defaults"
local SinglePrecisionFloat = require "st.zigbee.data_types.SinglePrecisionFloat"
local ALARM_COMMAND = "alarmCommand"
local ALARM_DURATION = "warningDuration"
local DEFAULT_MAX_WARNING_DURATION = 0x00F0
local zcl_global_commands = require "st.zigbee.zcl.global_commands"
local Status = require "st.zigbee.generated.types.ZclStatus"
Copy link
Contributor

Choose a reason for hiding this comment

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

For ease of reading, can you separate out the device-specific constants here from the library imports?

@greens greens changed the title Add support to frient smoke co sensor WWSTCERT-10514 Add support to frient smoke co sensor Feb 27, 2026
@greens greens changed the title WWSTCERT-10514 Add support to frient smoke co sensor WWSTCERT-10511/WWSTCERT-10514 Add support to frient smoke co sensor Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants