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

Consider item options for selection widget when no mapping is defined #912

Closed
lolodomo opened this issue Jun 2, 2018 · 10 comments
Closed
Labels
enhancement Indicates new feature requests

Comments

@lolodomo
Copy link
Contributor

lolodomo commented Jun 2, 2018

As discussed in eclipse-archived/smarthome#4942 it would be cool to implement this feature in the Android app too.
I just implemented it in Basic UI and Classic UI; it was already present in Paper UI.

@mueller-ma mueller-ma added the enhancement Indicates new feature requests label Jun 2, 2018
maniac103 added a commit to maniac103/openhab.android that referenced this issue Jun 18, 2018
@maniac103
Copy link
Contributor

@lolodomo Is there a quick way to test this with the demo setup?

@mueller-ma
Copy link
Member

There is an example sitemap in eclipse-archived/smarthome#4942 (comment). I recommend to check the rest api if the values are present. If not, you need to update your oh server.

@maniac103
Copy link
Contributor

Yes, but AFAICT an item which is linked to a special channel with options support is needed. My question is whether there's a way to have such a channel without the need for special hardware support.

@lolodomo
Copy link
Contributor Author

No I don't think this is available in the demo sitemap. It requires using a binding that defines some options for a channel, either statically or dynamically.
I used the netatmo binding for my tests.

@maniac103
Copy link
Contributor

Which of the Netatmo channels does have options? I do have a Netatmo station, so that one would work well for testing for me.

@mueller-ma
Copy link
Member

Your PR worked for me. Maybe @lolodomo can test it as well so you don't have to test it.

@lolodomo
Copy link
Contributor Author

Temperature trend and pressure trend.

@maniac103
Copy link
Contributor

I don't see any trend channels either for the indoor or the outdoor sensor ... I guess this is some post-2.3 thing? If so, I'd like to rely on @mueller-ma 's testing :-)

@lolodomo
Copy link
Contributor Author

lolodomo commented Jun 19, 2018

@maniac103
Copy link
Contributor

facepalm It appears when clicking 'Show more' ... stupid me. Thanks, I'll give that a try.

mueller-ma pushed a commit that referenced this issue Jun 19, 2018
* Rename OpenHABWidgetMapping to OpenHABLabeledValue.

A mapping basically is a value with a UI label, so generalize the class
name to be able to use it in other places later.

Signed-off-by: Danny Baumann <[email protected]>

* Add support for populating selection widget from item options.

Fixes #912

Signed-off-by: Danny Baumann <[email protected]>

* Simplify selection widget click handling.

Signed-off-by: Danny Baumann <[email protected]>

* Improve selection widget spinner click handling.

Signed-off-by: Danny Baumann <[email protected]>

* Improve variable naming.

Signed-off-by: Danny Baumann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

3 participants