Create Item
Name: STAT_254_ITEM
Label: Thermostat - Température
Type: Number
Category: temperature
Semantic Class: Sensor
Link Item to Channel
Channel:
T Thermostat - Température ONLINE
HomePiServer MQTT Client
mqtt:topic:fc45f59da5:df7323a6d3:STA_254_TMP_CHAN
Item:
Thermostat - Température
Number · Equipment>Sensor
STAT_254_TMP_ITEM
Add to Site MAP
Insert Widget Inside Sitemap
Aa (text)
Label: Thermostat - Température
Item: Thermostat - Température (STA_254_TMP_ITEM)
Icon: temperature
Code:
sitemap Maison label=“Maison” {
Text icon=“temperature” label=“Thermostat - Température” item=STAT_254_TMP_ITEM
}
QUESTIONS
How can I specify that this is a float variable with one decimal such as:
[%.1f °C]
Where is is possible to specify the label and value color such as:
labelcolor=[>=28=“red”, >=24=“orange”, >=19="#E6E600", >=15=“lime”, >=0=“blue”]
valuecolor=[>=28=“red”, >=24=“orange”, >=19="#E6E600", >=15=“lime”, >=0=“blue”]
To be frank, what’s the reasoning ? If you want to keep your Basic UI sitemap, just do. If you want to make use of the advantages main UI gives you, abandon sitemaps i.e. stop investing work.
But maintaining sitemaps through UI ?
For the record, this can be a “relatively easy” temporary solution for people who still want to use the UI configuration method and need to add not yet supported features:
Use the UI to create the sitemap page as part of the UI configuration steps
Go to the code TAB of the sitemap page
Copy the non json part
Paste the contents into a sitemap file (e.g.Home.sitemap under openhab/conf/sitemaps)
Stop openhab
Save and then delete uicomponents_system_sitemap.json under openhab/userdata/jsondb.
You may need to recover this file for further modification if necessary
Verify and delete any *–uicomponents_system_sitemap.json under openhab/userdata/jsondb/backup
Restart openhab
Check that you are now accessing the Home.sitemap file rather than the json one
From now on you will be able to edit and modify the sitemap as before, adding all the features that are not supported yet
Of course this process shall be done when your map is nearly finalized, otherwise you will iteratively need to suppress the sitemap file and restore the json to maintain the configuration up to date and then recreate a sitemap file.
NB: Unfortunately editing the non-json and adding not supported yet features to the sitemap page doesn’t work; the unknown features are causing unrecoverable errors.
Robert
I think there is still a place for BasicUI. I personally have no plan on using them going forward but Pages are way more complex and overwhelming to some users so having the option to build a sitemap through the UI could be very useful.
But I tend to agree that those users who are migrating their already existing sitemaps the better approach will be to keep them in .sitemap files or to move over to Pages instead of recreating an existing sitemap through the UI.