-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[hdpowerview] Remove unnecessary init checks and fix Thing status detail #12331
Conversation
@fwolter, thanks for these improvements. Especially with this change, everything seems to be falling into place:
When recently doing 271d027, this kind of validation by the framework is exactly what I was missing. |
@fwolter - I tested with core 3.3 (latest snapshot, build 2764) and this configuration:
blind1 correctly came ONLINE as configured with a valid ID. blind4 was correctly marked as GONE as ID doesn't exist. But blind2 and blind3 were left with status UNKNOWN while they should probably have been marked as OFFLINE with configuration error? |
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.
Please see comments.
...c/main/java/org/openhab/binding/hdpowerview/internal/handler/HDPowerViewRepeaterHandler.java
Show resolved
Hide resolved
I would agree. Sounds like a bug in the core. |
Signed-off-by: Fabian Wolter <[email protected]>
25ccad5
to
6dbd5d7
Compare
Signed-off-by: Fabian Wolter <[email protected]>
So maybe we should park this PR until core is fixed, since right now the validation within the binding is actually needed? |
Yeah, do you open an issue? |
Yes, I can. Seems it will be related to openhab/openhab-core#2682. |
Getting prepared to create issue - were you able to reproduce the problem also? |
No, I didn't test it. |
@fwolter - I did one more test, latest 3.3-snapshot (build 2774) and this time from a clean installation. Now with different result - same config:
I then tried reverting #12364 from your branch to see if So I'm sorry, I don't know why my previous test failed. Perhaps my test installation had some left-overs after simply overwriting all files with new snapshot. Conclusion: No issue to be created and I think this PR is ready to be merged. |
I think that's the best outcome we can get! |
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.
Thanks for this improvement!
…ail (openhab#12331) * [hdpowerview] Remove unnecessary init checks and fix Thing status detail Signed-off-by: Fabian Wolter <[email protected]> Signed-off-by: Nick Waterton <[email protected]>
…ail (openhab#12331) * [hdpowerview] Remove unnecessary init checks and fix Thing status detail Signed-off-by: Fabian Wolter <[email protected]>
…ail (openhab#12331) * [hdpowerview] Remove unnecessary init checks and fix Thing status detail Signed-off-by: Fabian Wolter <[email protected]> Signed-off-by: Andras Uhrin <[email protected]>
…ail (openhab#12331) * [hdpowerview] Remove unnecessary init checks and fix Thing status detail Signed-off-by: Fabian Wolter <[email protected]>
This PR is based on #12330.
@jlaur @andrewfg I made the following changes:
initialize()
if the Bridge type is correct. The UI doesn't let you configure a wrong type and the syntax of the .things file doesn't let you specify a wrong type either, because you can't even configure the binding ID for child Things. For example, use a Bridge of the LCN binding and configure a shade. The child Thing definition is ignored by the framework: