-
-
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
[sonnen] Fix channel types, Energy should be Power #15384
Conversation
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.
Ok, looks fine
Also adapt the documentation and drop the batteryFeedIn in the documentation which is not part of the binding. Fix openhab#15365 Signed-off-by: Tim Lochmüller <tim@fruit-lab.de>
I added the "Signed-off-by"-thing to my commit. Sorry for the second round... is my first contribution to openHAB. |
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.
LGTM
Only one comment, an upgrade instruction.xml could be added
https://www.openhab.org/docs/developer/bindings/thing-xml.html#updating-thing-types
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.
Fix openhab#15365 Signed-off-by: Tim Lochmüller <tim@fruit-lab.de>
I added the instructions. I hope "targetVersion" => 2 is the right one? Regards, Tim |
It seems right, but you also need to update it here: openhab-addons/bundles/org.openhab.binding.sonnen/src/main/resources/OH-INF/thing/thing-types.xml Line 35 in 3b9b023
It would be really nice if you could give it a test run in order to avoid regressions. You would need to create a managed Thing with the version prior to your changes. Then uninstall the binding and drop your JAR into the addons directory. The item type for those channels should then automatically change to |
Fix openhab#15365 Signed-off-by: Tim Lochmüller <tim@fruit-lab.de>
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.
LGTM
I leave the rest to the addons maintainers.
Just to be clear: Everything looks fine, I was only waiting for a confirmation of successful migration test. Let me know, and we can merge this PR. 🙂 |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/sonnen-battery-binding/130488/26 |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/sonnen-battery-binding/130488/32 |
@jlaur : I assume noone wants to test the migration ! So maybe you can merge if you think the code looks fine. |
All right, let's give it a wider audience. Fingers crossed. 🙂 |
I tested it. It works. The change is indeed correct. Please merge |
Also adapt the documentation and drop the batteryFeedIn in the documentation which is not part of the binding. Fix openhab#15365 Signed-off-by: Tim Lochmüller <tim@fruit-lab.de>
Also adapt the documentation and drop the batteryFeedIn in the documentation which is not part of the binding. Fix openhab#15365 Signed-off-by: Tim Lochmüller <tim@fruit-lab.de> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Also adapt the documentation and drop the batteryFeedIn in the documentation, which is not part of the binding.
Fix #15365 / #15365
The binding define different things/channels in "Number:Energy" but these are regular "W" entries in the binding. So "Number:Power" is the right channel type. This fix should avoid the warnings in the log, that the binding try to put a "W" into the "Number:Energy" item:
Failed to update item 'Sonnen_Battery_Consumption' because '721 W' could not be converted to the item unit 'kWh'