-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
[MainUI] Overview Page prevents variables from working correctly in widgets etc #2046
Comments
Hi. |
Fixes openhab#2046. Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Hi Mark, sorry for the delay, there are many things to work on especially for one alone ...
If you need to handle vars globally (i.e. outside of the widget defining it), consider using the new With support for setting |
Thanks Florian. I rea;;y appreciate you taking another look. |
FYI I think there is a new snapshot available including the fix. |
Thank you. I have installed and it is definitely working on the Overview page now :-)
I now just need to see if the other changes I had made to prevent certain widgets rendering unless open work or if I need to look at |
The problem
I use variable inside certain widgets to control the visibility of blocks depending on the state of a variable defined inside a widget.
The widget I developed worked perfectly in the Widget Editor as well as on my Overview-TEST page. However when I put it live on the Overview page I could not get the f7-block to display on activating the variable. The following is what should happen vs what actually happens (as you will see pressing OPEN should toggle the variable between true and false):
The widget code I used for this test is:
During debugging it also became evident that when initializing a variable on the actual Overview page as follows (code extract from the code tab of Overview page:
The variable
defineVars
is not processed on the actual Overview page, however it is processed on the Setting, Pages, Overview page used for editing etc.VS:
It is also important to note that the widget seems to start working on the Overview page if the Overview page is left active on a browser for an extended period (>30min). After that period for some reason the widget just works. However if the page is refreshed the widget once again stops working
I have also checked and the are no errors reported on the browser console when trying the press the button etc to cause the widget to fail.
I have reproduced this issue on my Live system, on a Clean install running OH 4.0.2 as well as on that system upgraded to 4.1.0 Build #3606
I have also tested with Chrome, Edge, Firefox and the Android APP, and see the same issue all 4.
Expected behavior
I would expect that the widget would perform the same way on the Overview page as on any other page as well as on the widget editor and that variables defined using
defineVars:
should be honored on all pages.I am baffled by the fact that the widget starts working after an extended period of time of the Overview page being active.
Steps to reproduce
In order to test the
defineVars
setting the steps to reproduce would be:label: Overview
settingYour environment
Browser console
Additional information
There is a lot of detail in the community thread I created around this issue:
https://community.openhab.org/t/oh4-0-2-cell-based-widget-not-working-on-overview-page-but-works-on-other-pages/149172
A slightly more complex widget that also does not work. Uses more level for the variable:
The text was updated successfully, but these errors were encountered: