under openhab 2.5 this command line displayed the current item status in an HTML file:
At the moment I’m in the process of designing a gas station map under oh3.2. For example, I use the following command to insert an image into the HTML file:
<td style="min-width:50px" align="center"><img src="https://126.96.36.199:8453/static/bilder/jet_png.svg" width="32" height="32"></img></td>
In order to be able to display the appropriate command line in this HTML file (it is part of a widget), I need the “translation to oh3.2”. The first command worked very well on openhab 2.5. However, I don’t know if there is an alternative for OH3.2.
I cannot help with your initial question, but have you considered to use map or floorplan widgets, where you can out of the box show an item state within a map or image?
No I have not. The widget works in principle, I would like to modify it a little. It is a gas station card with the binding “Tankerkoenig”.
The ability to refer to an Item like that was something only implemented by the Weather 1.x binding. The way the Weather 1.x binding enabled that is not allowed for 2.x bindings (bindings should not know about Items, just Channels and Links). So that
itemValue feature is not supported in OH 3 at all since no 1.x bindings are supported.
Note, I moved this to a more appropriate category. Tutorials and Solutions is a place to post tutorials and solutions, not a place to ask for one.
Sorry I’m only getting back to you now. I was away for a few days.
Your answer has increased my knowledge of openhab yet again. So I find z. B. a MainUI widget is very interesting. However, I don’t know how something like this is structured, can you read about it somewhere?
So far I’ve solved the problem by creating a widget next to the HTML file. In the ad, I aligned the HTML file and the widget side-by-side. However, the alignment of the lines is not exact, you can see the difference.
The getting started tutorial UI section: Pages - Introduction | openHAB
The UI Docs starting at Building Pages - Components & Widgets | openHAB