Open UrsusS opened 3 years ago
Did you try to escape your slash in the label, like "//h" ?
This line produces the same NPE
Number:VolumetricFlowRate num_Softener_WaterFlow "akt. Durchfluß errechnet [%2.2f m³//h]" <softener> (gSoftener, gRestoreOnStartup, gLog, gDel1M) ["Point"]
as
Number:VolumetricFlowRate num_Softener_WaterFlow "akt. Durchfluß errechnet [%2.2f m³]" <softener> (gSoftener, gRestoreOnStartup, gLog, gDel1M) ["Point"]
While
Number:VolumetricFlowRate num_Softener_WaterFlow "akt. Durchfluß errechnet [%2.2f m³/h]" <softener> (gSoftener, gRestoreOnStartup, gLog, gDel1M) ["Point"]
works as expected.
Please try %unit% insted of specifying the unit directly.
Which UI are you reporting an issue for?
displayed within openHAB app 2.16.0 on Android.
The problem
Expected behavior
no NPE... an error message instead
Steps to reproduce
The unit defined in the sitemap does not fit to the unit of the item.
Item:
Number:Volume num_Softener_WaterFlow "akt. Durchfluß errechnet [%2.2f m³]" <softener> (gSoftener, gRestoreOnStartup, gLog, gDel1M) ["Point"]
the follofing line in a sitemap causes the NPE:Text item=num_Softener_WaterFlow label="Durchfluß [%2.2f m³/h]" valuecolor=[swi_Softener_Reset_Required == ON = "silver"]
if the label is changed to
Text item=num_Softener_WaterFlow label="Durchfluß [%2.2f m³]" valuecolor=[swi_Softener_Reset_Required == ON = "silver"]
there's no NPE anymore.The same problem happens if defined the otherway:
Number:VolumetricFlowRate num_Softener_WaterFlow "akt. Durchfluß errechnet [%2.2f m³/h]" <softener> (gSoftener, gRestoreOnStartup, gLog, gDel1M) ["Point"]
Text item=num_Softener_WaterFlow label="Durchfluß [%2.2f m³]" valuecolor=[swi_Softener_Reset_Required == ON = "silver"]
Your environment
Browser console
Browser network traffic
Additional information
I know that the original problam is caused due to an unlogical condition, but it can happen and than the system should react accordingly.