Supply allowed string values of @AttributeDefinition channels - #3020
Supply allowed string values of @AttributeDefinition channels#3020Lamarqe wants to merge 1 commit into
Conversation
|
Does this solve the Issue
? |
|
No idea. |
|
Is there anything which I need to do in order to receive a review or other feedback about how to proceed? |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #3020 +/- ##
=============================================
+ Coverage 55.64% 55.68% +0.05%
- Complexity 19016 19025 +9
=============================================
Files 3670 3670
Lines 171447 171480 +33
Branches 14113 14119 +6
=============================================
+ Hits 95377 95475 +98
+ Misses 72302 72232 -70
- Partials 3768 3773 +5 🚀 New features to boost your workflow:
|
|
Thank you for the contribution. I'll need some time to review it in detail. Ideally I would like to not add it to the parent Doc directly as it relates only to Enums. Also the code does not fully align with our coding guidlines (https://openems.github.io/openems.io/openems/latest/contribute/coding-guidelines.html) |
a134b79 to
3e24c5c
Compare
|
Thank you for having a first look and taking the time for a full review. Regarding the the style warnings: During the last hour, I applied the Eclipse code formatter to all modified files and updated the branch accordingly. PR should be clean now. |
a7f7ea9 to
51a27ac
Compare
51a27ac to
7c207a3
Compare
|
@sfeilmeier : do you think you will find the time to do a full review anytime soon? |
34d5b38 to
c0bce96
Compare
c0bce96 to
36e9ed6
Compare
|
Is there any chance to get this MR merged? Then I would just close it and stop investing time in doing regularly rebases and retests. |
If i am honest i do not know the exact Usecase as neither the UI nor any other Component uses them incorrectly - if you would provide a little more Use-Case info it would be good i guess. I am not in the Position to Merge nor to reject - just my Questions! :) |
|
Yes, valid and good question. Having this information available in the channel definition will allow for a generic integration into other smart home systems. One example of such a connected system could be Home Assistant. But this MR is fully independent of the concrete connected system. |
36e9ed6 to
e1a295a
Compare
|
Sorry, I hardly find time to work on this feature. The two reasons why I don't immediately accept your current implementation:
|
fee0410 to
ee8c901
Compare
ee8c901 to
d5ac6bb
Compare
dcd877b to
c422d35
Compare
This PR has been automatically marked as stale due to inactivityIf it is still relevant, please update the PR. Before updating, please review our Contribution Guidelines to ensure all required information is provided. |
aa2d7fb to
2174ff2
Compare
This PR has been automatically marked as stale due to inactivityIf it is still relevant, please update the PR. Before updating, please review our Contribution Guidelines to ensure all required information is provided. |
2174ff2 to
68fb9ca
Compare
68fb9ca to
8efdd0a
Compare
|
Hi @sfeilmeier, As this would be a really valuable addition, I went over it again with the intention to adjust the implementation according to your feedback and create unit test coverage. Regarding your implementation comment:
This is exactly what my implementation does. The EdgeConfig enum parsing stores the options in the schema field templateOptions->options. My implementation gets this information exactly in the point you recommend ("where the Channel is created") See (https://github.com/Lamarqe/openems/blob/c28f59b9c4c127731a7f05f459cef21a6466a7d9/io.openems.edge.common/src/io/openems/edge/common/component/AbstractOpenemsComponent.java#L359-L364) If this is not adequate: Could you give a few more details of how you would like to have the implementation changed? |
8efdd0a to
c28f59b
Compare
|
As part of re-basing, I noticed a recent code change which is similar to the extension made with my PR. This gives me better confidence that my changes are aligned with the existing implementation. Also, I added today the unit tests requested by Stefan. |
90c7d1e to
4b7688d
Compare
|
@sfeilmeier : Can we please move on with this PR? Earlier review comments have been incorporated / answered. |
4b7688d to
2babd0e
Compare
2babd0e to
9720e70
Compare
Until now, AttributeDefinition channels (channels, whose names start with _Property) which are based on Enums do not provide the allowed values in their type defintions retrieved via edge call
getChannelsOfComponent().For example the channel ctrlEvcs0/_PropertyChargeMode provides:
With this pull request, the allowed enum values (which were stored internally already previously) are published correctly: