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] Humidity_temp_sensor Battery capability change #1853

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hjl-aqara
Copy link

@hjl-aqara hjl-aqara commented Jan 7, 2025

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

@CLAassistant
Copy link

CLAassistant commented Jan 7, 2025

CLA assistant check
All committers have signed the CLA.

end
device:emit_event(capabilities.batteryLevel.battery(batteryLevel))
end

local function device_init(driver, device)
battery_defaults.build_linear_voltage_init(2.6, 3.0)(driver, device)
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be removed

@Kwang-Hui
Copy link
Contributor

STSE-3474

@Kwang-Hui
Copy link
Contributor

Hi @lelandblue , I couldn't find driver sharing link for this PR. could you check?

Copy link

github-actions bot commented Jan 8, 2025

Duplicate profile check: Passed - no duplicate profiles detected.

Copy link

github-actions bot commented Jan 8, 2025

@@ -53,27 +53,49 @@ local is_aqara_products = function(opts, driver, device)
return false
end

local function device_init(driver, device)
battery_defaults.build_linear_voltage_init(2.6, 3.0)(driver, device)
Copy link
Contributor

Choose a reason for hiding this comment

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

battery_defaults is now unused

Copy link
Contributor

Choose a reason for hiding this comment

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

This is unused and replaced with battery_level_handler

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. But the require needs to be removed. That's why luacheck failed.

Copy link
Contributor

@Kwang-Hui Kwang-Hui Jan 8, 2025

Choose a reason for hiding this comment

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

oh. I get it. @hjl-aqara , Could you remove line number 1?

- local battery_defaults = require "st.zigbee.defaults.battery_defaults"

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I just took care of it.

Copy link

github-actions bot commented Jan 8, 2025

Test Results

   64 files    404 suites   0s ⏱️
2 012 tests 2 012 ✅ 0 💤 0 ❌
3 474 runs  3 474 ✅ 0 💤 0 ❌

Results for commit 7775fb9.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jan 8, 2025

File Coverage
All files 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/plant-link/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/aqara/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/init.lua 94%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 7775fb9

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.

5 participants