Skip to content
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

[MainUI] [change request] Create Equipment from Thing suggests localised Item name #2812

Open
hmerk opened this issue Oct 19, 2024 · 6 comments
Labels
enhancement New feature or request main ui Main UI

Comments

@hmerk
Copy link

hmerk commented Oct 19, 2024

The problem

As the title says, create Equipment from thing suggests localised Item Names, like below
image

AppleWatch4privat_Apple_Watch_Series_4_Ladezustand : Ladezustand instead of batteryStatus

While creating more widgets to be added to the semanticHomeMenu series, I would like users to use the create Equipment from Thing function to achieve a near to zero config effort. Having localised Item names makes this impossible.

Your suggestion

Change the create Equipment fromm Thing and Point from Thing functionality to not suggest localised Item names.

@florian-h05 @ghys WDYT ?

@hmerk hmerk added enhancement New feature or request main ui Main UI labels Oct 19, 2024
@hmerk hmerk changed the title [change request] Create Equipment from Thring suggests localised Item name [MainUI] [change request] Create Equipment from Thing suggests localised Item name Oct 19, 2024
@ghys
Copy link
Member

ghys commented Oct 21, 2024

I remember you pitching me this I believe in Koblenz some years ago :)
I think most of the time the display names would be more acceptable as a basis to suffix the name items than using for instance channel UIDs which can be quite obscure. The problem is that now that they're more and more localized and therefore you can't rely on them having a stable suffix.
Maybe that could be made an option, use the display names (by default) or the UIDs if you prefer.

@hmerk
Copy link
Author

hmerk commented Oct 21, 2024

Yes, don't remember where and when, but now I finally created an issue for it.
I can understand your concerns and am absolutely fine with having this as an option.
I am actually designing some nice new stuff and would like to use the naming from our home builder wizard and the create equipment from thing option. This will allow users to create nice UIs with absolutely low effort.

@hmerk
Copy link
Author

hmerk commented Oct 22, 2024

@ghys reading your comment again, I don't really understand how the displayName would help solve my issue.
As i understood, the displayName is the localised name, but I need something not localised, so it would work for anyone.

@ghys
Copy link
Member

ghys commented Oct 23, 2024

If the option was available to choose between channel ID (stable) and displayName channel label (potentially translated) to build item names you'd simply tell users to use the ID.
I don't remember the specific case that led me to believe it was better to use the label to build the item name in general.
But here's another example:
https://github.com/openhab/openhab-addons/blob/a6bb5373ea21fabbc55b5319c5c1e45547ead3d5/bundles/org.openhab.binding.nibeheatpump/src/main/resources/OH-INF/thing/f1x45-types.xml#L7-L13

	<channel-type id="f1x45-40004">
		<item-type>Number</item-type>
		<label>BT1 Outdoor Temp</label>
		<description>Outdoor temperature</description>
		<state pattern="%.1f °C" readOnly="true">
		</state>
	</channel-type>

In this case it's better IMHO to use the label (item name suggestion: HeatPump_BT1OutdoorTemp) than the ID (item name suggestion: HeatPump_f1x45_40004), which is technical and doesn't give much indication. But your case is to have stable names so it might make sense also - hence the suggestion to have the option.

@hmerk
Copy link
Author

hmerk commented Oct 23, 2024

Ok, now understood, but don't like the idea with channelId.
What I really was asking was the not localised channel label. This would be stable and more understandable than the id. The siggested item label could still be built based on the localised channel label.

@ghys
Copy link
Member

ghys commented Oct 25, 2024

the not localised channel label

Agreed, but that would have to be exposed by the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

No branches or pull requests

2 participants