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
Fix broken MQTT Sensor invert option #8972
Conversation
Thanks for the PR. Please consider adding a release note in the help/en/releasenotes/current-draft-note.shtml file. |
Codecov Report
@@ Coverage Diff @@
## master #8972 +/- ##
==========================================
Coverage 49.62% 49.63%
- Complexity 54029 54066 +37
==========================================
Files 4446 4446
Lines 399477 399611 +134
Branches 58917 58926 +9
==========================================
+ Hits 198233 198327 +94
- Misses 181290 181299 +9
- Partials 19954 19985 +31
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #8972 +/- ##
==========================================
Coverage 49.62% 49.63%
- Complexity 54029 54066 +37
==========================================
Files 4446 4446
Lines 399477 399611 +134
Branches 58917 58926 +9
==========================================
+ Hits 198233 198327 +94
- Misses 181290 181299 +9
- Partials 19954 19985 +31
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if those are public or not won't affect functionality so I won't request changes. But if they can't be reached where they are now, moving them to the turnout class might be a good idea.
public final static String closedText = "CLOSED"; | ||
public final static String thrownText = "THROWN"; | ||
public final static String unknownText = "UNKNOWN"; | ||
public final static String inconsistentText = "INCONSISTENT"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these really be reached from scripting? They're static on an anonymous class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the constants can stay in this file, but moved to the outer class MqttTurnout.
@bobjacobsen Should I go forward and merge this? |
This PR seems ready to be merged. The only issue is about constants not being accessible from scripts and that is something I can fix in a separate PR if desired.
Should I go forward and merge this?
Should I create a new PR which moves the constants to the outer class MqttTurnout?
The change was to make them read-accessible for a dynamic subtype. Jython couldn’t access them while they were private.
If somebody wants to be able to change them, I think removing the `final` would be OK.
I don’t think they should be made MqttTurnout class static; they are logically part of the (default) parsing plugin, which can vary from MqttTurnout instance to MqttTurnout instance.
|
Also small comment updates