I have some problem with dynamic icons, actually with one icon - icon of motion - it doesn’t change with the change of the item it corresponds to. But when i change item’s category from motion to presence the icon starts changing.
This happens everywhere - semantic model, floorplan etc
I have suggestion that this can be caused by custom on/off value of the occupancy channel:
And little more screens
I tried using the MAP transformation
but all I got was this
- Platform information:
- Hardware: RPI4 - 4GB RAM / 64GB usb SSD
- OS: Raspbian GNU/Linux 11 (bullseye)
- Java Runtime Environment: openjdk version “17.0.7” 2023-04-18
- openHAB version: openHAB 4.0.2 Release Build
- Please post configurations (if applicable):
- Items configuration related to the issue:
Not all icons are dynamic, therefore it’s expected that the icon will not change based on status.
You could create your own dynamic icon as it’s deceived in the documentation
Please, whenever possible, do not post pictures but text (especially when the picture is only text…)
That’s one reason for the code part of the Main UI Editor, you can simply copy the code to the clipboard and paste it here (marked as code).
A Switch Item has two “valid” values, these are
A mapping of values is to get a mapping of an input value to an output value, the input here is ON and OFF, not true or false (and not on or off either) and the warning is clear enough. there is no mapping for ON or OFF in the map. But you won’t need no mapping, so this is only for completeness…
For dynamic Icons, it’s a simple yet effective method, there are icons for each valid value and a generic icon, so for a dynamic
switch icon it would be
Now, the presence icon is in fact dynamic BUT… as it’s a read only attribute (and typically a motion sensor will open or close a contact), the motion icon is for
So simply change (i.e. delete the old and create a new) the channel to be of type contact instead of switch.
Set On/Open Value and Off/Closed Value correct. Link the channel to a Contact Item and set all correct and you should be fine.
Thank you very much, your answer helped me, I was in great desperate.
PS: sorry for pictures, thought it would be more “visual” )