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

Adds support for BG Electrical EHC31 Extension Lead (0x6480) #745

Closed
wants to merge 3 commits into from

Conversation

squarefeet
Copy link

Context

This PR adds support for the BG Electrical EHC31, a smart extension lead (or power-strip) with device type 0x6480.

I'm not a Python dev, but this small change seems to work! I tried to stick to existing conventions where I noticed them.

I've tested this extensively locally with my own little test script, and noted down in the comment for this new device's set_state() method my findings just in case they'd be of use to anyone else.

Note: Since I branched off master, this PR can't be automatically merged. If it'd be easier, I can re-create my fork from the new_product_ids branch and re-open this PR.

Proposed change

  • Added new device class of ehc31, which extends the existing bg1 class to devices.py
  • Added ehc31 definition to SUPPORTED_TYPES with device type 0x6480
  • Bit of code-formatting in the SUPPORTED_TYPES object (thanks VSCode/Black)
  • Added EHC31 to the supported devices list in README.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New device
  • New product id (the device is already supported with a different id)
  • New feature (which adds functionality to an existing device)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests
  • Documentation

Additional information

  • This PR fixes issue: fixes #
  • This PR is related to:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • The code has been formatted using Black.
  • The code follows the Zen of Python. Probably!?
  • I am creating the Pull Request against the correct branch.
  • Documentation added/updated.

felipediel and others added 3 commits November 20, 2022 15:44
* Add support for RM4C mini (0x520D) (mjg59#694)

* Add support for SP4L-US (0x648C) (mjg59#707)

* Add support for RM4C mate (0x5211) (mjg59#709)

* Add support for RM4 mini (0x521C) (mjg59#710)

* Add support for LB1 (0x644B) (mjg59#717)
@felipediel
Copy link
Collaborator

Closed with #784. Thanks @squarefeet!

@felipediel felipediel closed this Apr 9, 2024
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.

2 participants