OH3 dynamic icon and sitemap parameters are not working

I wish to have motion icon changing the color and text description depending on its state.
I configured an Item called AEOTECMultisensor6_MotionAlarm as switch and defined StateDescription as

value: " "
  options: ON=ALARM!,OFF=OK

This works nice es expected.

I have problems to define the color of the motion icon depends on the state. (red when ON, green when OFF)
How can i do that? Can i define that in the metadata of the item?

For the Sitemap.
Trying to do the same as I did it in OH2 with valuecolor or labelcolor within OH3 and sitemap code I receive an error:

Are dynamic parameters for sitemaps working?

If you want to change the color based on the state of the Item, you need to use an F7, Material, etc. type icon, not the OH icon. Then you can use an expression for the iconColor parameter. You can use the color parameter. Most fields can be customized using expressions like this.

For oh icons they pretty much work as they always have. You can’t customize the color. All that happens is the precreated icon that is associated with the Item’s state is chosen based on the Item’s state. If you need something else, you need to create new icons and save them to $OH_CONF/icons/classic per Items | openHAB.

Thanks for explanations. I will read and try it out.
Is this valid also for dynamic parameters in Basic UI? Why typing valuecolor parameter shows errors in the code window?

No, BasicUI only supports oh type icons.

Probably because you’ve typed it in the wrong place, or it’s a widget that doesn’t support it or something like that. Be sure to review the component reference to see what properties are supported for each component.

Nothing has changed since we had this conversation yesterday

The MainUI sitemap editor had/has a number of bugs relating to advanced widget configuration.
Try editing in a text editor or VSCode.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.