GladysAssistant / Gladys

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

[Zwavejs UI] Binary Switch support #2002

Closed sescandell closed 8 months ago

sescandell commented 9 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

Binary Switch support tested with real life device Fibaro Wall plug - FGWPE-102.

Manage displaying state and updating state from the UI. Also working with scenes (when the current implemented door sensor opens, it turns on the Binary Switch)

image

image

image

codecov[bot] commented 9 months ago

Codecov Report

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

Comparison is base (07b28c6) 98.21% compared to head (66bd93b) 98.32%. Report is 4 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2002 +/- ## ========================================== + Coverage 98.21% 98.32% +0.10% ========================================== Files 800 835 +35 Lines 12492 13226 +734 ========================================== + Hits 12269 13004 +735 + Misses 223 222 -1 ```

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

relativeci[bot] commented 9 months ago

Job #2338: Bundle Size — 9.82MiB (~-0.01%).

66bd93b(current) vs d6dfdc9 master#2319(baseline)

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

Bundle metrics  Change 2 changes Improvement 1 improvement
                 Current
Job #2338
     Baseline
Job #2319
Improvement  Initial JS 5.34MiB(~-0.01%) 5.34MiB
No change  Initial CSS 303.16KiB 303.16KiB
Change  Cache Invalidation 54.28% 58%
No change  Chunks 51 51
No change  Assets 164 164
No change  Modules 1454 1454
No change  Duplicate Modules 20 20
No change  Duplicate Code 0.8% 0.8%
No change  Packages 124 124
No change  Duplicate Packages 3 3

Bundle size by type  Change 1 change Improvement 1 improvement
|            |       Current
[Job #2338](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2338-rIrGgTEmftQxC50VWgIn?utm_source=github&utm_medium=pr-report "View job report") |      Baseline
[Job #2319](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2319-qIZOtmPo4Na0uu5dwNqI?utm_source=github&utm_medium=pr-report "View baseline job report") | |:--|--:|--:| | Improvement  [JS](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2338-rIrGgTEmftQxC50VWgIn/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.03MiB` (`~-0.01%`) | `7.03MiB` | | Not changed  [IMG](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2338-rIrGgTEmftQxC50VWgIn/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.36MiB` | `2.36MiB` | | Not changed  [CSS](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2338-rIrGgTEmftQxC50VWgIn/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.67KiB` | `319.67KiB` | | Not changed  [Fonts](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2338-rIrGgTEmftQxC50VWgIn/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` | | Not changed  [Other](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2338-rIrGgTEmftQxC50VWgIn/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") | `16.82KiB` | `16.82KiB` | | Not changed  [HTML](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2338-rIrGgTEmftQxC50VWgIn/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` |

View job #2338 reportView sescandell:zwavejs-ui-integratio... branch activityView project dashboard

sescandell commented 9 months ago

It seems you're modifying the external_id format

Isn't the current format enough?

It was:

zwavejs-ui:2:0:notification:access_control:door_state_simple

In my case

I've gone back and forth on this so much that I don't really know anymore. Let me check: either I tell you, or I rollback.

sescandell commented 9 months ago

@Pierre-Gilles I rolled back the feature external id format. It should be the same as before.

I reverted the serialport update too.

Tests are fine, the CI/CD failed on uploading the report... If you can juste relaunch it.

Pierre-Gilles commented 8 months ago

@sescandell Thanks ! I restarted the tests !