Gibber
(Rick Gibson)
May 1, 2021, 11:24pm
1
Hi,
I am trying to use the “visible” feature to control the appearance of an “Open Door” item in an OpenHAB 3 sitemap created with Main UI.
I edited the “visible” metadata section of the Default List Item Widget to include an expression but OH seemed to ignore it. So I tried simplifying and just put “= false” in the visible section and it still displays the item. The Widget is default (oh-label-item).
Widget code is as follows:
value: " "
config:
visible: = false
The item displays fine and is dynamic. Ie the icon changes from a closed door to an open door. The log shows the state change but nothing else. Tried restarting OH.
Situation is the same whether viewed in Basic UI or iPhone
Any ideas?
rossko57
(Rossko57)
May 1, 2021, 11:41pm
2
BasicUI doesn’t use metadata, it uses sitemap files to control display.
Sitemap widgets do allow a visibility=
option, as described in sitemap docs.
The GUI sitemap editor has a bug about visibility=
, but you can otherwise edit your sitemaps textually.
https://github.com/openhab/openhab-webui/issues/324
Gibber
(Rick Gibson)
May 2, 2021, 9:54pm
3
Thanks for the response rossko57.
Just to clarify, the “visible” function of a sitemap widget created with Main UI will not work? You referred to it as a bug. Does that mean there should be a resolution at some point?
And when you say I can edit my sitemaps textually, does that mean to create a sitemap text file in the
openHAB-conf/sitemaps directory?
Is it possible to edit the code text in the text area of the Main UI instead?
rossko57
(Rossko57)
May 2, 2021, 11:49pm
4
Did it work for you?
It’s logged as an issue. That does not guarantee a volunteer to work on it, or that a fix is feasible.
Yes.
I don’t know, does it offer that?
I have the same or similar issue?
Trying to hide a point completely in the MainUI.
That is the metadata for the “Default list item widget”.
Still the point is visible.
In the code tab I find:
value: ""
config:
visible: "false"
What could be wrong?
rlkoshak
(Rich Koshak)
May 14, 2021, 2:12pm
7
You need to remove the quotes from around "false"
in the code view.
That works. So should I file a bugreport because the UI clearly says I should enter false which I did but then is translated as “false” into the metadata?
rossko57
(Rossko57)
May 16, 2021, 9:20am
9
Maybe the text is wrong, it does hint at ‘expression’.
Does the expression = false
do the job ?
rlkoshak
(Rich Koshak)
May 17, 2021, 4:34pm
10
I think an issue was already filed. But definitely try rossko57’s suggestion. It may just need an update to the inline docs there.
hubsif
(Hubsi)
May 18, 2021, 7:40pm
11
Right, the github issue was
opened 05:43PM - 05 Feb 21 UTC
closed 08:28AM - 09 May 21 UTC
bug
main ui
<!--
Please DO NOT ERASE this template, but fill in the details as requested. T… his will ensure your issue is properly filed and will be considered. Otherwise, we may reserve the right to close it without further action.
-->
## When you edit the metadata in the UI for visibility options, the code is not properly transferred into the code so the entry is not valid.
![image](https://user-images.githubusercontent.com/37692544/107069210-e576c200-67e1-11eb-8eb6-7fe817ea7913.png)
![image](https://user-images.githubusercontent.com/37692544/107069239-f0c9ed80-67e1-11eb-902d-ae47978a3830.png)
<!--
Describe the issue you're having. In most cases it is appreciated to share screenshots or
even animated GIFs of your issue.
To make screenshots:
* On Windows: use Win+Shift+S
* On macOS: use Cmd+Shift+4
To make animated GIFs we recommend:
* On Windows: ShareX - https://getsharex.com/
* On macOS: Giphy Capture - https://giphy.com/apps/giphycapture
* On GNU/Linux: Peek - https://github.com/phw/peek
-->
## Expected behavior
i believe it should be translated into
![image](https://user-images.githubusercontent.com/37692544/107069270-0212fa00-67e2-11eb-9aab-8b1e5c86bcb7.png)
## Steps to reproduce
<!--
Provide accurate steps to reproduce the issue, including pastes of widget/page code if necessary.
-->
1.
## Your environment
<!--
As an admin, in the main UI, choose *Help & About* on the left sidebar, expand *Technical information* and click on *View details*, then click *Copy* and paste the results here. You may omit information that is not pertinent to this issue if you feel it's divulging information you'd like not to share.
-->
```yaml
```
## Browser console
<!--
Open the developer tools in your browser, go to the Console tab and paste errors and other messages that might be relevant to this issue.
You may also paste a screenshot if you prefer.
-->
```txt
```
## Browser network traffic
<!--
Open the developer tools in your browser, go to the Network tab and paste
screenshots of the network traffic and the details of individual requests that failed.
-->
## Additional information
<!--
Provide any information not pertinent to the above sections that you'd still like to share.
-->
and has been fixed. Entering false
in the UI should transfer correctly to visible: false
(without quotes) in the code for upcoming versions.
2 Likes
xr37
(X)
July 5, 2021, 9:11am
12
Just wondering if it would be possible to reference bug [MainUI] New sitemaps do not understand "visibility" & "valuecolor" · Issue #324 · openhab/openhab-webui · GitHub in the docs here: Sitemaps | openHAB
It would possibly avoid some confusion for new users (like me ). I do not have access to Github so cannot modify the documentation myself.
rossko57
(Rossko57)
July 5, 2021, 11:41am
13
The Githib issue was fixed in early May, and I assume would have made it into release 3.1
1 Like