So I’m trying to set up a new HabPanel by using @xsherlock nice Widget-switches. So far I just imported the widget and edited the items, so that it now reflects my items.
I was just wonderring; instead of me starting to create a new widget everytime I make a new switch, wouldn’t it then be possible to change the items names I have with a Variable or so, that from the HabPanel configuration view would allow me to locate all my items? Just like when addind a normal switch to a panel?
I don’t use HABPanel that much so I can’t help but I think you will get better attention from the right people in the HABPanel section so I moved the post. Good luck!
In your case you’ll define a setting of type Item with an id, for example “item”, and replace: "item": "TV_Stue_Mute"
in the template by: "item": config.item
So I both in the line <div ng-init='model= removed the name so it only says “”, but should that be config.name then?
I tried the config.item, but as shown above no luck :(.
I don’t know why I missed that when I read it.
Seems be working great! One last thing - is it possible to grab the Name that you type when editing template settings?
Before I manually entered the Text that I wanted to show here:
It’s been discussed before, but really needs to end up in the wiki article
You can use {{ngModel.name}} to retrieve the name of your widget in the code.