-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
[Basic UI] After GenericItem.setCategory(…)
icons are not updated until manual reload
#1938
Comments
GenericItem.setCategory(…)
icons are not updated until manual reload
I don't think it is really expected to use |
I cannot say anything about when this function should or should not be called, but couldn't the server send a "item changed" sse event anyway? |
Few additional information:
I will probably not investigate more, my opinion is that sitemap UIs are not conceived to react in real time to setup changes. A simple page reload after a change of setup looks fine to me. And changing the category of an item or sitemap widget is a setup change. |
openhab/openhab-android#3427 described the use case for this request and states, that the server does not send category-changed events. Page reload does not help here. The item is suuposed to present many properties of a device(equipment) in a compact way. One piece of the presentation is the icon(category). When the state of one item changes, the icon of of another item is modifed. E.g. when one item is ON the icon of another item presents the symbol |
This is a valid use case imo. I use the key: property to refresh repeaters and other widgets
|
Ok, I propose to extend the syntax for icon parameter to make it more dynamic:, that is with conditions on possible other item states. This will also add a dynamic feature when using non openHAB icons. |
Related to openhab/openhab-webui#1938 Example: icon=[item1>0=temperature,==0=material::settings,material::home] Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab/openhab-webui#1938 Allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material::settings,material::home] Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab/openhab-webui#1938 Allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material::settings,f7::house] Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab/openhab-webui#1938 Allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material::settings,f7::house] Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab/openhab-webui#1938 Allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material::settings,f7::house] Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab/openhab-webui#1938 Allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material::settings,f7::house] Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab/openhab-webui#1938 Allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material::settings,f7::house] Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab/openhab-webui#1938 Allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material::settings,f7::house] Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab/openhab-webui#1938 Allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material::settings,f7::house] Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab/openhab-webui#1938 Allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material::settings,f7::house] Signed-off-by: Laurent Garnier <[email protected]>
…ditional rules for icon Allow multiple conditions with AND operator in visibility/color/icon rules Closes openhab#3058 Also allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material:settings,f7:house] Related to openhab/openhab-webui#1938 Signed-off-by: Laurent Garnier <[email protected]>
…ditional rules for icon Allow multiple conditions with AND operator in visibility/color/icon rules Closes openhab#3058 Also allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material:settings,f7:house] Related to openhab/openhab-webui#1938 Signed-off-by: Laurent Garnier <[email protected]>
…ditional rules for icon Allow multiple conditions with AND operator in visibility/color/icon rules Closes openhab#3058 Also allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material:settings,f7:house] Related to openhab/openhab-webui#1938 Signed-off-by: Laurent Garnier <[email protected]>
…ditional rules for icon Allow multiple conditions with AND operator in visibility/color/icon rules Closes openhab#3058 Also allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material:settings,f7:house] Related to openhab/openhab-webui#1938 Unit tests added or extended to cover the new features. Signed-off-by: Laurent Garnier <[email protected]>
…ditional rules for icon Allow multiple conditions with AND operator in visibility/color/icon rules Closes openhab#3058 Also allow dynamic icon based on other item states. Allow dynamic icon even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material:settings,f7:house] Related to openhab/openhab-webui#1938 Unit tests added or extended to cover the new features. Signed-off-by: Laurent Garnier <[email protected]>
This allows dynamic icons based on items states even with non OH icon sources. Example: icon=[item1>0=temperature,==0=material:settings,f7:house] Related to openhab/openhab-webui#1938 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 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 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 Signed-off-by: Laurent Garnier <[email protected]>
With openhab/openhab-core#3819 and openhab/openhab-core#3820 merged, I believe your use cases are now covered by the ability to define more complex rules in the sitemap. |
I update an icon of an item using
.setCategory()
, as described at openhab/openhab-android#3427 . The icons are not updated in Basic UI, until I manually reload the page.After I manually reload (F5) the webpage, the new icon is shown, so
.setCategory()
has indeed performed the desired change.I have openHAB 3.4.2.
The text was updated successfully, but these errors were encountered: