I am trying to design a widget that looks like a real life light switch that visually toggles when switched on or off. I have two images that represent the ON and OFF states.
So far I have an image card that displays the OFF image and actually switches the lamp on and off. However, I want the displayed image to toggle according to current state, i.e. change to the OFF-image when the is actually off.
This is my widget so far:
uid: LightSWitch tags:  props: parameters: - description: A text prop label: Prop 1 name: prop1 required: false type: TEXT - context: item description: An item to control label: Item name: item required: false type: TEXT parameterGroups:  timestamp: May 1, 2021, 2:05:08 PM component: oh-image-card config: action: toggle actionItem: BuroDeckenlicht_4_STATE actionCommand: ON url: /static/buttons/switch_white_square_OFF.png actionCommandAlt: OFF
The switching works fine, but how can I toggle the image as well?
Thanks for any assistance on this one.