Skip to content

BUG2-2243 Add composite display to zigbee humidity sensors#1586

Merged
greens merged 1 commit intomainfrom
feature/BUG-2243
Aug 27, 2024
Merged

BUG2-2243 Add composite display to zigbee humidity sensors#1586
greens merged 1 commit intomainfrom
feature/BUG-2243

Conversation

@greens
Copy link
Copy Markdown
Contributor

@greens greens commented Aug 16, 2024

Updates profile to show both temperature and humidity on the device card for zigbee humidity/temperature sensors.

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

@greens greens requested review from Kwang-Hui and bflorian August 16, 2024 20:00
@github-actions
Copy link
Copy Markdown

Duplicate profile check: Passed - no duplicate profiles detected.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 16, 2024

Channel deleted.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 16, 2024

Test Results

   61 files  ± 0    375 suites  ±0   0s ⏱️ ±0s
1 822 tests  -  5  1 822 ✅  -  5  0 💤 ±0  0 ❌ ±0 
3 146 runs   - 31  3 146 ✅  - 31  0 💤 ±0  0 ❌ ±0 

Results for commit 0e2f661. ± Comparison against base commit 5bd9bbd.

This pull request removes 5 tests.
Custom Humidity report should be handled
Handle tempOffset/humidityOffset preference infochanged
Test profile change on init for humidity sensor with battery
Test profile change on init for humidity sensor without battery
Test profile change on init for temperature-humidity sensor

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 16, 2024

matter-sensor_coverage.xml

File Coverage
All files 84%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/smoke-co-alarm/init.lua 83%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/embedded-cluster-utils.lua 42%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/init.lua 82%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/air-quality-sensor/init.lua 91%

zigbee-humidity-sensor_coverage.xml

File Coverage
All files 81%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/smoke-co-alarm/init.lua 83%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/embedded-cluster-utils.lua 42%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/init.lua 82%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/air-quality-sensor/init.lua 91%
/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/plaid-systems/init.lua 66%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/centralite-sensor/init.lua 69%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/configurations.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/init.lua 69%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/heiman-sensor/init.lua 77%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/frient-sensor/init.lua 68%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/aqara/init.lua 91%

zwave-sensor_coverage.xml

File Coverage
All files 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/smoke-co-alarm/init.lua 83%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/embedded-cluster-utils.lua 42%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/init.lua 82%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/air-quality-sensor/init.lua 91%
/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/plaid-systems/init.lua 66%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/centralite-sensor/init.lua 69%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/configurations.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/init.lua 69%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/heiman-sensor/init.lua 77%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/frient-sensor/init.lua 68%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-humidity-sensor/src/aqara/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/preferences.lua 99%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/homeseer-multi-sensor/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/apiv6_bugfix/init.lua 80%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/wakeup-no-poll/init.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/fibaro-flood-sensor/init.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/zooz-4-in-1-sensor/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/sensative-strip/init.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/aeotec-multisensor/multisensor-6/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/aeotec-multisensor/multisensor-7/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/aeotec-multisensor/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/enerwave-motion-sensor/init.lua 92%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 0e2f661

Copy link
Copy Markdown
Contributor

@Seong-Yeol-Park Seong-Yeol-Park left a comment

Choose a reason for hiding this comment

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

It looks good to me.

version: 1
values:
- label: " {{humidity.value}} {{humidity.unit}}"
composite: true No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

no newline at a end of file

@greens greens changed the title BUG-2243 Add composite display to zigbee humidity sensors BUG2-2243 Add composite display to zigbee humidity sensors Aug 19, 2024
explicit: true
- preferenceId: humidityOffset
explicit: true
config:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The root level property name has to be deviceConfig. Also, until CODA-3870 has been implemented, the device config has to contain all of the sections, i.e. detailView and automation. Same comment for the other files

Copy link
Copy Markdown
Contributor

@Seong-Yeol-Park Seong-Yeol-Park left a comment

Choose a reason for hiding this comment

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

@greens I'm sorry for confusing you with the wrong example.
I added suggestions for corrections.

Copy link
Copy Markdown
Contributor

@Seong-Yeol-Park Seong-Yeol-Park left a comment

Choose a reason for hiding this comment

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

Could you also remove these lines?
As far as I know, when we use root deviceConfig, embed config shouldn't be used.

Thank you!

https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/pull/1586/files#diff-3d8741588a39d2231d633a95fa58fa4445e6755677944b2bb6ac0a4811243e46R7-R10

Copy link
Copy Markdown
Contributor

@Seong-Yeol-Park Seong-Yeol-Park left a comment

Choose a reason for hiding this comment

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

All changes looks good to me.
But it seems like that removing these lines is missing.

a2881ef#diff-3d8741588a39d2231d633a95fa58fa4445e6755677944b2bb6ac0a4811243e46R7-R10

Copy link
Copy Markdown
Contributor

@Kwang-Hui Kwang-Hui left a comment

Choose a reason for hiding this comment

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

Looks good to me

Updates profile to show both temperature and humidity on the device card for zigbee humidity/temperature sensors.
@greens greens merged commit cce6c1c into main Aug 27, 2024
@greens greens deleted the feature/BUG-2243 branch August 27, 2024 16:11
@cjswedes
Copy link
Copy Markdown
Contributor

Heads up that this change breaks some unit tests, because the added yaml for the profiles, despite being valid yaml is not able to be parsed by our lua libs yaml parser for the profiles.

@greens
Copy link
Copy Markdown
Contributor Author

greens commented Aug 29, 2024

@cjswedes Ah. I guess since it was only yaml changes the unit tests didn't run. I can work on implementing a fix here.

@Seong-Yeol-Park
Copy link
Copy Markdown
Contributor

@greens Could you let me know when this PR will be deployed to the production?

@greens
Copy link
Copy Markdown
Contributor Author

greens commented Sep 9, 2024

@Seong-Yeol-Park later this week. Thursday in Korea.

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