-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
Items: Add unit
metadata for UoM (Number:
) Items
#1901
Conversation
Closes openhab#1890. Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Florian Hotze <[email protected]>
bundles/org.openhab.ui/web/src/assets/definitions/metadata/namespaces.js
Outdated
Show resolved
Hide resolved
bundles/org.openhab.ui/web/src/components/item/metadata/item-metadata-unit.vue
Outdated
Show resolved
Hide resolved
Job #1009: Bundle Size — 15.77MiB (+0.01%).Metrics (no changes)
Total size by type (2 changes)
|
Looks good. Please note that the metadata |
@spacemanspiff2007 wrote on the linked issue:
I also had a look at the linked core issue openhab/openhab-core#3615. I will provide a field to set the Item metadata on Item creation and as soon as the core PR for UoM information is merged, we can populate the unit metadata field with the system default. WDYT? |
Sounds great, as long as the field will always be automatically populated so creating an UoM item will always result in the corresponding
How about |
If we don't want to postpone again the milestone 3, the merge of this PR would be greatly appreciated (if it works). |
Additionally the unit will be used in UIs if no unit is specified for the state description.
We could maybe avoid mentioning specifically a tool that is not part of the official OH distribution (and not in OH documentation) ? |
I would suggest to use |
This is not ready yet and for setting the unit metadata when creating a UoM Item, openhab/openhab-core#3611 has to be merged first. |
IMHO, if we have this PR allowing to easily add the unit metadata, the change in item creation page could be delayed. |
If we agree to delay the change in Item creation page this doesn’t need the core PR and I should be able to finish this (it’s just about naming and descriptions then) from my iPad. |
Addressing review. Signed-off-by: Florian Hotze <[email protected]>
@ghys Can you please review and merge this for M3? Thanks! |
It's shown in the rule technology overview. Also NodeRed, jRuby, Mycroft AI are mentioned multiple times through the whole docs and these are all not part of the official OH distribution. So the argument "not part of the official OH distribution" does obviously not apply. |
I'm not arguing against the sentiment (I have no problems with mentioning tools outside the OH project in the docs where it make sense). But I wanted to correct this list of examples of external projects.
All three of these examples are a part of official openHAB. But again, I'm not arguing that HABApp shouldn't be mentioned in the docs anywhere because it isn't part of the openHAB project. In fact, isn't it an option in openHABian to install? If not it should be. That would make it as "official" as NodeRed at least. However, because HABApp isn't discussed anywhere in the docs except that one table in Getting Started, it's a poor choice to use as an example in the description of the field built into MainUI. So I agree with @lolodomo in this one case but not as a general rule to apply everywhere. |
Nicely written and I mostly agree with you.
It has been since over two years - option |
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 for the description part. Can't comment on the code.
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.
We wouldn't want a milestone release with the core change but no UI support. LGTM, thanks for the implementation!
Fixes openhab#1933. Follow-up for openhab#1901. This enables the unit metadata for UoM groups (i.e. groups with a groupType of `Number:`). Signed-off-by: Florian Hotze <[email protected]>
Fixes #1933. Follow-up for #1901. This enables the unit metadata for UoM groups (i.e. groups with a groupType of `Number:`). -- Signed-off-by: Florian Hotze <[email protected]>
Fixes #1890.
This adds the
unit
metadata from openhab/openhab-core#3481 to the pre-defined metadata namespaces for UoM Items (Item typeNumber:
) and provides a metadata edit page for it.Once openhab/openhab-core#3611 is merged, the Item create page will be adjusted to set the
unit
metadata to the system default on Item creation.