GladysAssistant / Gladys

A privacy-first, open-source home assistant
https://gladysassistant.com
Apache License 2.0
2.55k stars 278 forks source link

[Zwave] Multilevel switch support (Dimmer and Curtains) #2061

Closed sescandell closed 3 months ago

sescandell commented 3 months ago

Pull Request check-list

To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Description of change

This PR is to manage multilevel switch. These devices could have multiple purpose. It handles specific curtains and standard dimmers.

Dashboard image

Intégration image

Tested on real life devices with Fibaro Walli Roller Shutter & Fibaro Walli Dimmer

This update introduces a new way to add multiple features from the same zWave property. This is usefull for example to manage, with the same property (currentValue) two different features: a Dimmer and a Binary state. For Dimmers, turning the device ON executes a restorePrevious state (cloning real button behavior).

relativeci[bot] commented 3 months ago

#2546 Bundle Size — 10.13MiB (+0.05%).

3a75f91(current) vs 88e10e2 master#2542(baseline)

[!WARNING] Bundle contains 3 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#2546
     Baseline
#2542
Regression  Initial JS 5.45MiB(+0.09%) 5.44MiB
No change  Initial CSS 302.96KiB 302.96KiB
Change  Cache Invalidation 53.65% 53.58%
No change  Chunks 51 51
No change  Assets 170 170
No change  Modules 1479 1479
No change  Duplicate Modules 21 21
No change  Duplicate Code 0.82% 0.82%
No change  Packages 124 124
No change  Duplicate Packages 3 3

Bundle size by type  Change 1 change Regression 1 regression
|            |       Current
[#2546](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2546-43mmgWKwJQKvwfTxRbEy?utm_source=github&utm_medium=pr-report "View bundle analysis report") |      Baseline
[#2542](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2542-1h2WMJEGTv4w2byDATYt?utm_source=github&utm_medium=pr-report "View baseline bundle analysis report") | |:--|--:|--:| | Regression  [JS](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2546-43mmgWKwJQKvwfTxRbEy/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-1_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-0%22%7D "View JS assets") | `7.23MiB` (`+0.07%`) | `7.22MiB` | | No change  [IMG](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2546-43mmgWKwJQKvwfTxRbEy/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-1_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-0%22%7D "View IMG assets") | `2.46MiB` | `2.46MiB` | | No change  [CSS](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2546-43mmgWKwJQKvwfTxRbEy/assets?ba=%7B%22filters%22%3A%22ft.CSS-1_ft.JS-0_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-0%22%7D "View CSS assets") | `319.75KiB` | `319.75KiB` | | No change  [Fonts](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2546-43mmgWKwJQKvwfTxRbEy/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-0_ft.MEDIA-0_ft.FONT-1_ft.HTML-0_ft.OTHER-0%22%7D "View Fonts assets") | `93.55KiB` | `93.55KiB` | | No change  [Other](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2546-43mmgWKwJQKvwfTxRbEy/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-1%22%7D "View Other assets") | `17.53KiB` | `17.53KiB` | | No change  [HTML](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2546-43mmgWKwJQKvwfTxRbEy/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-1_ft.OTHER-0%22%7D "View HTML assets") | `13.58KiB` | `13.58KiB` |

Bundle analysis reportBranch sescandell:zwaveMultilevelSwitchProject dashboard

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.40%. Comparing base (a6569de) to head (3a75f91). Report is 8 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2061 +/- ## ========================================== + Coverage 98.39% 98.40% +0.01% ========================================== Files 847 858 +11 Lines 13820 14038 +218 ========================================== + Hits 13598 13814 +216 - Misses 222 224 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

William-De71 commented 3 months ago

Thanks for checking the forum, I've added some comments about this PR.

https://community.gladysassistant.com/t/evolution-du-service-z-wave-js-ui/8692/38