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 #376

Merged
merged 2 commits into from
Jul 30, 2022
Merged

Conversation

Azrael-Kun
Copy link
Contributor

This pull request adds support for the SONOFF SNZB-01 Wireless Switch (see #321).

I have tested this using ZHA with just the controller blueprint and custom actions as well as connected to a light hook.
The deCONZ action maps I obtain from their button_maps file, and zigbee2mqtt from their device page on SNZB-01 and as provided in #321 but have not actually tested.

Proposed change*

  1. Add controller blueprint for the SONOFF SNZB-01 Wireless Switch
  2. Add support for this controller to the Light, Media and Cover hooks (actions match that of the E1812)
  3. Add website doc page for SONOFF SNZB-01 Wireless Switch
  4. Update website pages to include the SONOFF SNZB-01 Wireless Switch

Closes #321

Checklist*

  • I followed sections of the Contribution Guidelines relevant to changes I'm proposing.
  • I properly tested proposed changes on my system and confirm that they are working as expected.
  • I formatted files with Prettier using the command npm run format before submitting my Pull Request.

@github-actions
Copy link
Contributor

Hey @Azrael-Kun, thank you so much for your contribution! 🚀

🔄 We're currently running a few checks to make sure that everything is great with your contribution.
If further actions need to be performed before your contribution can be reviewed, additional guidance will be provided to you in the next comment.

Results are coming soon, stay tuned!

@github-actions
Copy link
Contributor

github-actions bot commented Jul 22, 2022

Hey @Azrael-Kun,

✅ Your contribution passed all the checks, awesome!
A maintainer will soon review your submission and provide additional feedback regarding your changes.

Thanks again for dedicating your precious time to this project. 🔥

📝 Updated blueprints included in this PR can be tested by importing them in Home Assistant via the following links.

https://github.com/Azrael-Kun/awesome-ha-blueprints/blob/sonoff_snzb01/blueprints/controllers/sonoff_snzb01/sonoff_snzb01.yaml
https://github.com/Azrael-Kun/awesome-ha-blueprints/blob/sonoff_snzb01/blueprints/hooks/cover/cover.yaml
https://github.com/Azrael-Kun/awesome-ha-blueprints/blob/sonoff_snzb01/blueprints/hooks/light/light.yaml
https://github.com/Azrael-Kun/awesome-ha-blueprints/blob/sonoff_snzb01/blueprints/hooks/media_player/media_player.yaml

Copy link
Owner

@EPMatt EPMatt left a comment

Choose a reason for hiding this comment

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

Hi @Azrael-Kun,
I'll perform a deeper code review tomorrow and check if something is missing, but overall this looks good to me.

Thank you so much for your contribution! This controller will be a great addition to our collection. :)

@github-actions
Copy link
Contributor

Hey @EPMatt, thank you so much for your contribution! 🚀

🔄 We're currently running a few checks to make sure that everything is great with your contribution.
If further actions need to be performed before your contribution can be reviewed, additional guidance will be provided to you in the next comment.

Results are coming soon, stay tuned!

@github-actions
Copy link
Contributor

github-actions bot commented Jul 30, 2022

Hey @EPMatt,

✅ Your contribution passed all the checks, awesome!
A maintainer will soon review your submission and provide additional feedback regarding your changes.

Thanks again for dedicating your precious time to this project. 🔥

📝 Updated blueprints included in this PR can be tested by importing them in Home Assistant via the following links.

https://github.com/Azrael-Kun/awesome-ha-blueprints/blob/sonoff_snzb01/blueprints/controllers/sonoff_snzb01/sonoff_snzb01.yaml
https://github.com/Azrael-Kun/awesome-ha-blueprints/blob/sonoff_snzb01/blueprints/hooks/cover/cover.yaml
https://github.com/Azrael-Kun/awesome-ha-blueprints/blob/sonoff_snzb01/blueprints/hooks/light/light.yaml
https://github.com/Azrael-Kun/awesome-ha-blueprints/blob/sonoff_snzb01/blueprints/hooks/media_player/media_player.yaml

@EPMatt
Copy link
Owner

EPMatt commented Jul 30, 2022

Hey @Azrael-Kun,

as I previously assessed, your contribution looks perfect! I've just added a few minor changes to your submission:

  • Bumped blueprint versions to 2022.07.30.
  • Added a note to the controller docs stating that the long press action does not support looping over a long press, since the device does not expose a corresponding release event.
  • Increased the number of manufacturers in controllers.mdx

Since these edits do not impact blueprint functionality and you've already successfully performed tests with ZHA, I'm now proceeding to merge this PR into main and make your changes available to the public.

Thank you so much for your precious work here! 🔥

@EPMatt EPMatt merged commit a2756dc into EPMatt:main Jul 30, 2022
github-actions bot pushed a commit that referenced this pull request Jul 30, 2022
* Add support for SONOFF SNZB-01

* add note for long press, bump versions to 2022.07.30

Co-authored-by: Matteo Agnoletto <[email protected]>
@EPMatt EPMatt mentioned this pull request Aug 7, 2022
3 tasks
@github-actions
Copy link
Contributor

Hi there,

🔒 This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you want to submit a contribution to the project, you can open a new PR.

Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Controller - Sonoff SNZB-01 Button
2 participants