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

Add support for Sonoff SNZB-01 #1525

Merged
merged 1 commit into from
May 30, 2022

Conversation

VonOx
Copy link
Contributor

@VonOx VonOx commented May 18, 2022

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:

  • If your changes affects code, did your write the tests?
  • Are tests passing? (npm test on both front/server)
  • Is the linter passing? (npm run eslint on both front/server)
  • Did you run prettier? (npm run prettier on both front/server)
  • If you are adding a new features/services, did you run integration comparator? (npm run compare-translations on front)
  • Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community for testing before merging.
  • If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
  • If you are adding a new features/services which needs explanation, did you modify the user documentation? See the GitHub repo and the website.
  • Did you add fake requests data for the demo mode (front/src/config/demo.js) so that the demo website is working without a backend? (if needed) See https://demo.gladysassistant.com.

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 provide support for Sonoff SNZB-01 button
https://community.gladysassistant.com/t/bouton-sonoff-snzb-01/6812/50?u=vonox

I've updated BUTTON_STATUS constants to use the same wording of the feature value

@codecov
Copy link

codecov bot commented May 18, 2022

Codecov Report

Merging #1525 (c95d5b9) into master (d45a7aa) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1525   +/-   ##
=======================================
  Coverage   96.57%   96.57%           
=======================================
  Files         618      618           
  Lines        8992     8995    +3     
=======================================
+ Hits         8684     8687    +3     
  Misses        308      308           
Impacted Files Coverage Δ
server/utils/constants.js 100.00% <ø> (ø)
server/services/zigbee2mqtt/exposes/enumType.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d45a7aa...c95d5b9. Read the comment docs.

@atrovato
Copy link
Contributor

Looks great. But it can have some impacts on existing instances... we should communicate on this point once this is available.
I don't think you can update scenes with a SQL file to avoid any behavior change...

@VonOx
Copy link
Contributor Author

VonOx commented May 21, 2022

Not sure about impact because old mapping (hold =5) is still the same, only event is renamed.

Copy link
Contributor

@Pierre-Gilles Pierre-Gilles left a comment

Choose a reason for hiding this comment

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

Following tests, I'm good for merge :)

@Pierre-Gilles Pierre-Gilles merged commit 66f5a9f into GladysAssistant:master May 30, 2022
@relativeci
Copy link

relativeci bot commented May 30, 2022

Job #327: Bundle Size — 6.74MB (~+0.01%).

66f5a9f vs c8e4a59

Changed metrics (2/10)
Metric Current Baseline
Initial JS 2.87MB(~+0.01%) 2.87MB
Cache Invalidation 42.39% 0%
Changed assets by type (1/7)
            Current     Baseline
JS 4.85MB (~+0.01%) 4.85MB

View Job #327 report on app.relative-ci.com

@VonOx VonOx deleted the z2m-sonoff-button branch May 31, 2022 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants