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

Label & Value Color not changing #1380

Closed
cribskip opened this issue May 30, 2019 · 7 comments · Fixed by #1383
Closed

Label & Value Color not changing #1380

cribskip opened this issue May 30, 2019 · 7 comments · Fixed by #1383
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@cribskip
Copy link
Contributor

Found the issue here and added my POV :-)

Actual behaviour

Using valuecolor or labelcolor settings, the setting is not applied to new values, thus requiring a manual refresh by pulling down or reopening the sitemap.

Expected behaviour

Color should be applied to new values.

Steps to reproduce

  1. Text item=AlarmSystemStatus_Output label="[MAP(alarmstatus.map):%s]" valuecolor=[>4="red",>2="yellow",==1="green"] icon="alarm"
  2. Change the value and watch color to change

Environment data

Client

  • Android version: 9
  • Device model: Xiaomi Poco Phone F1 / Mi 9
  • Stock or customized ROM: stock / MIUI 10.3.4 based on Android 9
  • App version : 2.6.9 & 2.7.1-beta
  • Build flavor : Full
  • Device language: ? / German
@cribskip cribskip added the bug Indicates an unexpected problem or unintended behavior label May 30, 2019
@maniac103
Copy link
Contributor

maniac103 commented May 30, 2019

Hmm, we currently don't parse the colors out of the SSE response: https://github.com/openhab/openhab-android/blob/master/mobile/src/main/java/org/openhab/habdroid/model/Widget.java#L329 ... are they actually part of the SSE events?

Edit: looks like it, actually: https://github.com/openhab/openhab-webui/blob/master/bundles/org.openhab.ui.basic/web-src/smarthome.js#L1987 ... I'll check and fix this.

@maniac103
Copy link
Contributor

@maniac103
Copy link
Contributor

(BTW, @mueller-ma, should we/I do this before or after the Kotlin conversion? Same question applies to the chart scaling fix.)

@mueller-ma
Copy link
Member

(BTW, @mueller-ma, should we/I do this before or after the Kotlin conversion? Same question applies to the chart scaling fix.)

Makes sense for both, so we can release a version with shortcuts and tasker and after that merge #1347 and #1356.

@maniac103
Copy link
Contributor

Makes sense for both

What makes sense - add those fixes before or after Kotlin conversion? ;-)

@mueller-ma
Copy link
Member

Fixing them before the kotlin merge.

@maniac103
Copy link
Contributor

OK, I'll send some PRs.

maniac103 added a commit to maniac103/openhab.android that referenced this issue May 30, 2019
We previously didn't update icon, label color and value color via SSE.

Fixes openhab#1380.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
mueller-ma pushed a commit that referenced this issue May 31, 2019
We previously didn't update icon, label color and value color via SSE.

Fixes #1380.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants