Hello community!
First of all: I have been using OpenHABian for almost exactly half a year now and I’m completely enthusiastic about the possibilities and have already successfully put several dozen things together. I use the PaperUI exclusively to manage and configure my things, rules are written with VSC and possibly a few items are also defined in VSC, if the rules require it. HABPanel is the only frontend I use for visualization and control of my smarthome.
My current “problem” (ok, it’s just a minor issue, but… ):
I have an item from my Netatmo weather station that provides the air pressure. This is a float or maybe even a double item with 380 decimal places (felt ). In a rule with number I cast that to int var, because I would like to have / need only an integer for displaying the item value in HABPanel.
It looks something like this:
var tWZ_Pressure = (netatmo_NAMain_e3a674ca_70ee5017dcbc_Pressure.state as QuantityType<Number>).intValue
The int var tWZ_Pressure is then written to an item WZ_Pressure (postUpdate) and WZ_Pressure is then displayed in the HABPanel using a dummy widget (such as humidity, volume, etc. also already are). So far everything is good and works!
I also use the integrated symbols, which adapt the display themselve accordingly based on the value of the item. Sometimes I also use self-created SVGs, which also work.
BUT: In contrast to (e.g.) air humidity, this does not work with the air pressure item. Here I have used the standard “pressure” icon as a user-defined icon, and have created the following SVG files:
- pressure.svg
- pressure-0.svg
- pressure-100.svg
- pressure-950.svg
- pressure-966.svg
- pressure-983.svg
- pressure-1000.svg
- pressure-1016.svg
- pressure-1033.svg
- pressure-1050.svg
The idea was now that the symbols being displayed are selected according to the value of the item (usually between 0 and 100, on or off, or 0 and 4) to implement the same here for the air pressure based on the corresponding value (WZ_Pressure is in the range between 950 and 1050). I.e. with a WZ_Pressure value of 1023 the symbol “pressure-1016” should be displayed - but it isn’t! HABPanel only uses the standard “pressure.svg” symbol regardless of the value (which is always correctly displayed as a number in the dummy widget).
So does the correct representation of the value-dependent symbol only work for values between 0 and 100? With the QualityOfService Icon it works with 0,1,2,3,4 - with the volume it works with 0,33,66,100 - with the light also from 0 - 100 in steps of 10, etc.
Does anybody knows if/why the auto-selecting of self-created symbols according to the value of an item works with values above 100? Or do these auto-selected symbols only work with values up to 100?
Maybe someone has tried that and has a solution for it or can kick me in the right direction…
Thank you!