-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
[Sitemap] Add optional conditional rules for icon #3820
Conversation
Please note that this enhancement of the sitemap syntax remains fully backward compatible. @openhab/android-maintainers The boolean |
I'd rather want to see 'null means no icon' in SSE events as well. Otherwise there's ambiguity between 'null means no icon' and 'null means no change'. |
In that case, an additional boolean field would be required to indicate if the icon must be reloaded or not. I can call it |
It's fine as far as I am concerned. The Android app doesn't need it either way since the OkHttp layer uses the URL (built from icon, state etc.) as caching key, so if there's no change in the parameters used for building the URL, no reload will happen. |
70e3b19
to
6b3e5e9
Compare
Changes done, I have updated my second message. |
This allows dynamic icons based on items states even with non OH icon sources. This also allows overwritting the default handling with state done by the icon servlet. Example: icon=[item1>0=temperature,==0=material:settings,f7:house] Related to openhab/openhab-webui#1938 Signed-off-by: Laurent Garnier <[email protected]>
6b3e5e9
to
df0a21c
Compare
Depends on openhab/openhab-core#3820 and openhab#1998 Signed-off-by: Laurent Garnier <[email protected]>
Depends on openhab/openhab-core#3820 and openhab#1998 Signed-off-by: Laurent Garnier <[email protected]>
Depends on openhab/openhab-core#3820 and openhab#1998 Signed-off-by: Laurent Garnier <[email protected]>
Depends on openhab/openhab-core#3820 and openhab#1998 Signed-off-by: Laurent Garnier <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks.
Depends on openhab/openhab-core#3820 and #1998 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab/openhab-core#3820 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab/openhab-core#3820 Signed-off-by: Laurent Garnier <[email protected]>
* Sitemap: extended syntax for icon to define conditional rules Related to openhab/openhab-core#3820 Signed-off-by: Laurent Garnier <[email protected]> * Considers review comments Signed-off-by: Laurent Garnier <[email protected]> --------- Signed-off-by: Laurent Garnier <[email protected]>
This allows dynamic icons based on items states even with non OH icon sources.
This also allows overwritting the default handling with state done by the icon servlet.
Example: icon=[item1>0=temperature,==0=material:settings,f7:house]
Related to openhab/openhab-webui#1938
Closes #1046
Signed-off-by: Laurent Garnier [email protected]