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

Update Schneider quirks using spec docs #3111

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

dflemstr
Copy link
Contributor

@dflemstr dflemstr commented Apr 15, 2024

Proposed change

This is a start of using the leaked Schneider Electric specification docs posted by @uvNikita in #1705, linked here again for convenience: https://drive.google.com/file/d/1rM9iVhAB-AlWwWhvpEtcReSpEATi7aVH/view

So far I have looked at the light related specs and updated the attributes with the information for the specs docs. More improvements could probably be made by incorporating info from the other device types too, but I only have light-related devices in my home (dimmers, switches, etc) so I can't test any other changes right now.

The comments have a number of grammar issues etc, but I copied them verbatim from the spec, so if there are any ambiguous statements, your guess is as good as mine!

Additional information

This PR renames some python variables/constant names to match the spec. I doubt that anything is using these in code already; if so, this could be a breaking change. I suppose @cspurk is the only person I know of that might be using this?

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.14%. Comparing base (24217a3) to head (334553f).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3111      +/-   ##
==========================================
+ Coverage   88.10%   88.14%   +0.03%     
==========================================
  Files         299      299              
  Lines        9358     9386      +28     
==========================================
+ Hits         8245     8273      +28     
  Misses       1113     1113              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dflemstr dflemstr force-pushed the schneider-spec-changes branch 3 times, most recently from 13784c6 to bf45816 Compare April 15, 2024 20:12
@TheJulianJES TheJulianJES changed the title Update Schneider quirks using the leaked spec docs Update Schneider quirks using spec docs Apr 21, 2024
Copy link
Collaborator

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

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

I think this looks pretty good, thanks!

@TheJulianJES TheJulianJES added the smash This PR is close to be merged soon label Apr 22, 2024
@TheJulianJES TheJulianJES merged commit cd141c6 into zigpy:dev Apr 23, 2024
6 checks passed
@dflemstr dflemstr deleted the schneider-spec-changes branch April 25, 2024 20:19
lgraf pushed a commit to lgraf/zha-device-handlers that referenced this pull request May 6, 2024
@uvNikita
Copy link

@dflemstr thank you for you work on this.
I have one question, my dimmer presents itself as "NHROTARY/UNIDIM/1" and it doesn't seem like these new changes apply to it. Could it be because it needs to be added to this file? https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/schneiderelectric/dimmers.py

If I understand it correctly, the signature/name of my dimmer is listed here:
image

@dflemstr
Copy link
Contributor Author

@uvNikita You are right that extra changes are needed for your device to be supported. Another class should be created for your device, since it has a slightly different device signature. I didn't add all the devices from the spec, I only adjusted the ones that already were in zha-device-handlers to the spec.

@dflemstr
Copy link
Contributor Author

I added support for your device like this in zigbee2mqtt to give you an idea: Koenkk/zigbee-herdsman-converters#7454

I'm not sure if I will have time to make the equivalent change here though since adding devices in zha-device-handlers is a lot more involved compared to zigbee2mqtt

@prilly-dev
Copy link

prilly-dev commented Aug 12, 2024

Just wanted to add that ELKO is selling this devices under its name after it was acquired by schneider. I hope we can have this UNIDIM device included also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
smash This PR is close to be merged soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants