I have the following icons in my images folder.
I’m seeing switches show television.png when the switch is off and should therefore be television-off.png. Toggling the switch on and off will make it display the correct icon.
Some time later, it will repeat it’s self and the issue returns.
Does anyone know how to resolve this behaviour.
Is the Switch Undefined when it is displaying the wrong icon? For example, did you change a .item file or restart openHAB and do not have persistence with restoreOnStartup for that Item?
It should only be using the television.png when the Switch is undefined.
Ah ok, I wrongly assumed that a switch would only have two states, off and on.
I’ll look into persistence for these items as I don’t have that configured.
So to clarify if the switch is undefined it will show as off in the gui?
All Items have an Undefined state in addition to their “working” states. When the Item is first initialized it is set to Undefined. When persistence with restoreOnStartup is configured instead of initializing the Items to Uninitialized it will initialize them to whatever the last saved value in the database is.
When the Switch is Undefined, the sitemap will use television.png. When it is OFF it will use television-off.png. When it is on it will use television-on.png.
The switch element itself will show the Item as OFF or CLOSED for Switches and Contacts. For Numbers and Strings it will show as ‘-’. I’m not sure what it does for sliders and setpoints.
Thanks for clarifying.
Starting to get a better understanding of openHab now.