Remove redundant else statements & add 3phase check#105
Draft
ryanm101 wants to merge 3 commits intobinsentsu:masterfrom
Draft
Remove redundant else statements & add 3phase check#105ryanm101 wants to merge 3 commits intobinsentsu:masterfrom
ryanm101 wants to merge 3 commits intobinsentsu:masterfrom
Conversation
7586e66 to
c9bf900
Compare
mpredfearn
reviewed
Sep 14, 2022
Contributor
mpredfearn
left a comment
There was a problem hiding this comment.
You should also split the 3 phase sensors out of SENSOR_TYPES and only register them in https://github.com/binsentsu/home-assistant-solaredge-modbus/blob/master/custom_components/solaredge_modbus/sensor.py#L48 if hub.read_3phase == True
That way single phase systems won't have all of the redundant additional sensors.
Contributor
|
This is a really good PR! Why was it never finished? |
Contributor
Author
|
I started to use: https://github.com/WillCodeForCats/solaredge-modbus-multi instead as it did everything i wanted and didnt block the TCP connection to the modbus as it polls instead of holding the connection. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Remove the additional phases if you have single phase supply.. #103
This should also be auto-configurable based on the C_SUNSPEC_DID (40069/40070); 101 = SinglePhase, 102=Split Phase (seems to be a USA thing), 103 = 3phase