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

Show state on Switch widget for Rollershutters #976

Closed
s-simma opened this issue Feb 4, 2016 · 11 comments
Closed

Show state on Switch widget for Rollershutters #976

s-simma opened this issue Feb 4, 2016 · 11 comments

Comments

@s-simma
Copy link

s-simma commented Feb 4, 2016

Hi,
Seting the Rollershutter state inside a binding e.g.:
this.updateState(new ChannelUID(getThing().getUID(), CHANNEL_POSITION), new DecimalType(position));
with item:
Rollershutter Shutter_GF_OfficeB "Büro Balkon [%d %%]" (GF_Office, Shutters) {channel="siennapl:Sienna_SAM2:1:PL1:position"}
does not display any %-value left to the three buttons of the rollershutter.
The rollershutter icon shows the correct icon (depending on the %-value) - but only as long as you are on the page with the rollershutter.

Classic-UI: it displays either 0% or 100% but not the state value set.

@kaikreuzer kaikreuzer changed the title Basic-UI problem with Rollershutter Show state on Switch widget for Rollershutters Feb 4, 2016
@kaikreuzer
Copy link
Contributor

This is about the switch widget for Rollershutter items in the Basic UI. The wish is that it shows the state as well, similar to how the Classic UI does it:
screen shot 2016-02-04 at 08 28 54
Currently, the Basic UI shows it like this:
screen shot 2016-02-04 at 08 33 14

@resetnow Could you have a look?

@kaikreuzer
Copy link
Contributor

I am actually wrong - the Classic UI also shows it without a value:
screen shot 2016-02-04 at 08 36 47
So I wonder if this request really makes sense - after all, a percentage value does not tell much about a rollershutter and the icon should be good enough to give a hint about the current position.

@s-simma
Copy link
Author

s-simma commented Feb 4, 2016

For sure, the classic-UI shows it with a value !!

@vlad-ivanov-name
Copy link
Contributor

@s-simma The one with a value is not a rollerblind widget, it's most likely a setpoint. Rollerblind widget has 3 buttons.

@kaikreuzer
Copy link
Contributor

Rollerblind widget has 3 buttons.

Yes, see #976 (comment)

@s-simma
Copy link
Author

s-simma commented Feb 4, 2016

screenshot - 04_02

@s-simma
Copy link
Author

s-simma commented Feb 4, 2016

@kaikreuzer
In my opinion it make sense for rollershutter and blinds. If you have heavy wind (> 8m/s) both shoud be open.

@kaikreuzer
Copy link
Contributor

Ok, you are right - I missed that the demo.items does not define a pattern and thus no value is displayed:

Rollershutter DemoShutter "Roller Shutter"

If I change it to

Rollershutter DemoShutter "Roller Shutter [%d %%]"

It indeed displays a value as per your screenshot.
So yes, I agree that if we define a state pattern through [] in the label, this should also be picked up by the Basic UI.

@vlad-ivanov-name
Copy link
Contributor

@kaikreuzer did you have an actual rollershutter controller when you were testing the sitemap item? I'm asking because I don't have one and when the item is not attached to the binding, the item state only changes to 0 and to 100. Is this normal?

@s-simma
Copy link
Author

s-simma commented Feb 4, 2016

@resetnow
in the classic-UI you can't set the value either from inside a binding. It shows only 0% or 100%.
In the Basic-UI it doesn't show any value.
All these problems with "don't showing/changing state values of a channel" arise when you set the state value from inside a binding handler such as:
this.updateState(new ChannelUID(getThing().getUID(), CHANNEL_POSITION), new DecimalType(position));

@kaikreuzer
Copy link
Contributor

@kaikreuzer did you have an actual rollershutter controller when you were testing the sitemap item?

No, I was merely using the demo setup and added the [%d %%] as described above.
It is correct that the state only changes to 0% and 100%, because it will simply assume it is UP or DOWN depending on the button you have pressed. But if the UI shows the 0 and 100, this is all that is asked for here - just the same way as the Setpoint widget already does:
screen shot 2016-02-05 at 08 58 06

vlad-ivanov-name pushed a commit to vlad-ivanov-name/smarthome that referenced this issue Feb 7, 2016
kaikreuzer added a commit that referenced this issue Feb 8, 2016
BasicUI: display rollerblind state if required, fixes #976
vlad-ivanov-name pushed a commit to vlad-ivanov-name/smarthome that referenced this issue Feb 8, 2016
…lind-value

BasicUI: display rollerblind state if required, fixes eclipse-archived#976
doubled-ca pushed a commit to doubled-ca/smarthome that referenced this issue Mar 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants