-
-
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
[shelly] Fix thing type descriptions for Plus Mini series #17015
Conversation
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
bundles/org.openhab.binding.shelly/src/main/resources/OH-INF/i18n/shelly.properties
Show resolved
Hide resolved
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, waiting for Markus to confirm.
@markus7017 - while you are currently active on #17011, would you care to review this one? 🙂 |
I was just working on similar cleanup in the other PR. README changes are fine I would like to keep MINI as a class of devices so
rather than
or even better
to make it more readable. The pending PR for Mini Gen3 will bring also a G3 suffix. I would suggest to keep the current notation and just fix the descriptions, which also reduces the size of the PR and change the name schema with the next PR including Gen3 names. Nevertheless, I'm also fine to merge it as is and take it from there with the next PR |
@@ -87,9 +87,9 @@ public class ShellyBindingConstants { | |||
THING_TYPE_SHELLYPLUSWALLDISPLAY, // | |||
|
|||
// Shelly Plus Mini | |||
THING_TYPE_SHELLYMINI1, // |
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.
let's keep it as is and clean-up with the next PR bringing also Mini G3
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.
Thing type id is shelly1mini
, so it seems inconsistent to use a different name here when the sole purpose of this constant is to reference the thing type. IMHO this is part of inconsistency which paved the way for this bug.
Just to give my 5 cents to this. I think, the confusion comes from device naming: They called really Shelly Mini 1 and so on. Binding choose another naming convention. I fixed this issue long time ago in my fork exactly oppisit way trying to take my Shellies to operation: 9749749 Commit is isolated so far and shall be cherry-pickable easy way. For Gen1 devices rest api call may return empty string. Means, the check in ShellyBaseHandler.java in line 159 shall check empty string. Some additional information can be found under https://community.openhab.org/t/shelly-binding/56862/3890 |
Thanks for chipping in. I just unboxed my first Shelly (PM Mini) this evening and got it online, so I now have my first hands-on experience. 😄 This already made me realize the implications behind this comment: #17009 (comment) regarding naming schema changes. The mDNS name of my device starts with "shellypmmini-" and I then found the logic for determining the thing type: Lines 547 to 552 in c0d2638
Line 477 in c0d2638
Line 190 in c0d2638
So the mapping between mDNS name and thing type here is a bit coupled (same constant used for key/value). OTOH, it seems mostly about naming (prefix Anyway, to conclude and reiterate the scope of this PR:
For improving and fixing determination of the API revision to use for specific devices/things, there is already #17011. |
The official device naming is One or the other, @jlaur I'm fine with your changes, please trigger a merge soI could finish #17012 to integrate support for Gen3 devices. |
Sorry, but I still don't understand your point:
So why would you prefer to keep I can understand that you may be annoyed by this: Line 407 in 7755681
i.e.
In that case, please approve the PR, and @lsiepel can merge it. |
@lsiepel - I suspect @markus7017 is not receiving messages/notifications when tagged, so I think you can merge based on the "written approval" above. |
I suspect htis should also be backported? |
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Yes, done. 🙂 Thanks! |
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
See #17013 (comment)
Before:
After:
Related to #17013