Problem with RfStatus

Hi there,

actually I want to have dynamic icons for RfStatus of my Netatmo outdoor module.

But now I have a behavior, which I don’t understand at all:
Sometimes the state of RfStatus is displayed as

  • “2” (decimal number)
  • “2.0” (look like a float)
  • “Durchschnittlich” (mapping to text)

… and in no cases I managed to configure dynamic icons, i.e. different icons depending on value.
(I have in icons/classic files for each state and a default: rf.png, rf-1.png … rf-5.png, but except the default icon no other icon is shown).

I tried to configure a “State Description”, but the behavior (what is displayed) seems to be random.

What am I doing wrong?

Thanks,
Markus

What are you looking at? i.e. which UI, what OH version.

What is your real Item state? Lookin your events.log and/or use the API to find out.

Using: OH 3.0.1, mainUI
event.log: contains nothing regarding RfStatus
Status “2.0” or “Durchschnittlich” is correct.

Here RfStatus is displayed with one decimal point:


… now RfStatus is displayed as text:

→ But I also had the case that RfStatus is displayed as integer, i.e. “2”

Icon is always the same (the one with “?”, which is the default, i.e. rf.png), although I have rf-1.png, rf-2.png etc.
I tried …

  • … to have rt-1.0.png, rt-2.0.png etc. and rt-durchschnittlich.png - no change at all
  • … type “Number” and “Number:Dimensionless” - no change at all.
  • … to add metadate for “State Description” with pattern “%.0f / 5” (as seen in a post) - no change at all

No,those wouldn’t work, they don’t follow the rules.
The icon picker serves up the same icon for state 1 or 1.0.

But I’ve no idea if MainUI supports dynamic icons at all in a basic item page. Have you looked in user-facing context, rather than admin?

Same in user-facing context.

Currently “Durschnittlich” is shown and when I log the item, I see in event.log:

[org.openhab.core.model.script.logger] - OutdoorModul_Signalstarke = OutdoorModul_Signalstarke (Type=NumberItem, State=2, Label=RSSI Netatmo Outdoor XX, Cat…

So, state seems to be an integer, but still dynamic icon (rf-2.png) is not used.

In documentation it’s stated that “Some icons are dynamically selected by openHAB depending on the Item’s state.” → does it depend on Item’s type? Which types support dynamic icons?
Further: “The state name must reflect the Item’s raw state.” → Where do I see the “real” raw state of the Item? Is it the one I see in event.log (see above: “State=2”)?

What you’ve done with icons seems correct.
You might read this thread for some problem areas

I’d try this out in BasicUI to rule out MainUI problems. Does MainUI use .png or only .svg?

Dynamic icon is not yet supported in the admin item page but is supported in equipments/properties pages and in sitemaps.
I declared an issue today.

1 Like