Adds support for BG Electrical EHC31 Extension Lead (0x6480) #745
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ehc31
, which extends the existingbg1
class todevices.py
ehc31
definition toSUPPORTED_TYPES
with device type0x6480
SUPPORTED_TYPES
object (thanks VSCode/Black)EHC31
to the supported devices list in README.Type of change
Additional information
Checklist