If your item isn’t a switch, then you shouldn’t use <widget-switch>
but <widget-dummy>
instead.
There is no state
property to pass to the model of those widgets, it’ll be the state of the item you configure as item
.
Also there might be additional properties required to make it look good, like "icon_replacestext": true
.
Try following the advice in HABPanel Development & Advanced Features: Start Here!
Instead of documenting every possible model option for every widget, here’s a trick: add your widget to a dashboard the standard way with the designer, give it an unique name to find it back easily, adjust the options as you like, then go to HABPanel’s advanced settings and click on the “Edit the local panel configuration” link. You will then have to find your widget (using its unique name) and you’ll have the complete model to pass to ng-model this way. You can leave out the row, col, sizeX, sizeY, type attributes since they’re relating to the dashboards layouts themselves - type is the type identifier to put after widget- as the node name.