Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

Add a thing configuration value selector #316

Open
hww3 opened this issue Aug 10, 2018 · 2 comments
Open

Add a thing configuration value selector #316

hww3 opened this issue Aug 10, 2018 · 2 comments

Comments

@hww3
Copy link
Contributor

hww3 commented Aug 10, 2018

It would be nice for custom widgets to be able to specify a configuration value type of "thing" that generates a selection list of things (as is possible to do with items).

@ghys
Copy link
Member

ghys commented Aug 10, 2018

Actually not too sure about this.
openHAB has a concept of items so that end user interfaces like HABPanel remain oblivious of the underlying physical side (things) and only see the functional model (items).

That's why HABPanel doesn't know about things and doesn't use them anywhere. Getting the list would also imply calling an additional API.

@hww3
Copy link
Contributor Author

hww3 commented Aug 10, 2018

Well, I guess my rationale is that:

Modeling every situation in terms of Items isn't always feasible or desirable (hence, for example, the possibility of custom event types).

Things can emit events, so it seems conceivable that you'd want to filter based on a particular thing. Not being able to have a pick list populated with Things means you have to find the thing somewhere else and then copy-paste it into a text field.

Other portions of the OpenHAB infrastructure provide for a configuration context type of "thing", so it seems reasonable from a consistency of functionality standpoint.

In terms of implementation, it involves similar infrastructure as is used for items (actually, it's almost identical with the exception of the data type names).

See my current implementation of this feature: hww3@401c8e8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants