Change icon based on value of Item

Using OH3, on the floorplan page. I have an icon (Motion) that I would like to change color based on whether motion is detected or not. The item uses the following: 0 (unknown), 1 (unoccupied), and 2 (occupied). I can’t figure out how to make the icon change to a different icon based on values. I’d imagine it’s done via adding code to the marker in the floorplan, but I can’t figure out what that code should be.

Hi everyone, I have a realated question. The syntax for the icon color that works for me is that

however I can make it display RGB color, only the predefined colors work.
I would expect that is should be something like that: with hex value

what am I doing wrong?

1 Like

Nothing. As far as I’m aware only the predefined F7 color names are supported.

1 Like

Are those those 15 base themes colors from this doc page? Color Themes | Framework7 Documentation

Or some other list?

BTW: I just noticed that deeporange can assigned to the icon color but not to the tooltip color! other colors work for the tooltip.

I think those are the ones. I thought there was a link to the list in form on MainUI already but it doesn’t appear to be there. It would be worth while to add such a link and change the description to make it more clear what colors are supported.

The inconsistency with deeporange looks like a bug.

1 Like