Hi Yannick, I know you made a nice disclaimer of no support
However, I have been struggling with dynamic icon syntax in your example for many hours, trying to find a solution. Else your template works great! My dynamic icons are also working well in habpanel dummy widget. So I believe the only issue is with the syntax.
I have custom dynamic icons in āclassicā folder, named dmotion.svg, dmotion-red.svg etc.
The item definition is:
String Pir01 "PIR1 [%s]" <dmotion> (gPirs, gPirsOutside)
And the widget template is as yours above, I only adjusted the first ng-init=āmodel part like this and the main issue is obviously at the end ⦠āiconā: ādmotionā, āstateā: itemState(Pir01) }ā>:
<div ng-init='model={"name": "PIR01", "item": "Pir01", "hidelabel": false, "hideonoff": false, "iconset": "eclipse-smarthome-classic", "icon": "dmotion", "state": itemState(Pir01) }'>
<widget-switch
style="position: absolute;
background: rgba(0,0,0,0);
border-radius: 20px;
top: 520px; left: 500px;
width: 60px; height: 80px"
ng-model="model" />
</div>
I tried all possible versions ( āstateā: itemState(āPir01ā); āstateā: āitemState(Pir01)ā; āstateā: itemState(āPir01ā) etc.) but no luck ![]()
Sometimes only the main icon works but not changed acc. to itemState, sometimes obviously wrong syntax so no icon displayed at all. I would really appreciate any helpā¦
Thanks!