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

Group functions for rollershutters show wrong value #1845

Closed
hazzeh opened this issue Jul 10, 2016 · 3 comments
Closed

Group functions for rollershutters show wrong value #1845

hazzeh opened this issue Jul 10, 2016 · 3 comments

Comments

@hazzeh
Copy link
Contributor

hazzeh commented Jul 10, 2016

There is a "bug" for the group functions (MAX/MIN/AVG..) for rollershutters I think.
Or is it by design?
When using group functions, for example MAX, the group value will be in decimal, not percent.
items:
Group:Rollershutter:MAX gBlinds "Blinds"

rest:
{
"members": [
{
"link": "http://localhost:8080/rest/items/blind1",
"state": "59",
"type": "RollershutterItem",
"name": "blind1",
"label": "Blinds",
"tags": [],
"groupNames": [
"gBlinds"
]
}],
"groupType": "Rollershutter",
"link": "http://localhost:8080/rest/items/gBlinds",
"state": "0.59000000",
"type": "GroupItem",
"name": "gBlinds",
"label": "Blinds",
"category": "rollershutter",
"tags": [],
"groupNames": []
}

If it is a bug, I've got a fix here: https://github.com/hazzeh/smarthome/tree/decmaltype_for_rollershu

@kaikreuzer
Copy link
Contributor

Looks indeed like a bug to me, happy to accept your fix as a PR!

hazzeh added a commit to hazzeh/smarthome that referenced this issue Jul 10, 2016
When setting Decimaltype state for a Rollershutter item
the state should be converted to PercentType.
Otherwise the group functions will present an error
of factor 100.

Fixes eclipse-archived#1845

Signed-off-by: Hans Hazelius <hans@hazelius.se>
hazzeh added a commit to hazzeh/smarthome that referenced this issue Jul 10, 2016
When setting DecimalType state for a Rollershutter item,
the state should be converted to PercentType.
Otherwise the group functions will present an error
of factor 100.

Fixes eclipse-archived#1845

Signed-off-by: Hans Hazelius <hans@hazelius.se>
hazzeh added a commit to hazzeh/smarthome that referenced this issue Jul 10, 2016
When setting DecimalType state for a Rollershutter item,
the state should be converted to PercentType.
Otherwise the group functions will present an error
of factor 100.

Fixes eclipse-archived#1845

Signed-off-by: Hans Hazelius <hans@hazelius.se>
@maggu2810
Copy link
Contributor

maggu2810 commented Jul 10, 2016 via email

@hazzeh
Copy link
Contributor Author

hazzeh commented Jul 10, 2016

Yes, it seems to be the same problem. My PR makes the same change for RolleshutterItem as #1514 did for DimmerItem.

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

3 participants