modify virtual switch for home/away icons and buttons?

The virtual switch with a small amount of luup code works great as a home/away switch, as described in several threads on this forum. Thanks to the pros on this forum that have talked about how to set this up.

I’ve poked around in several device/service/implementation files in my Vera2, but don’t see where the on and off icons (lightbulb) are defined and where the buttons are actually labeled. I would like to have my own icons (say a house when home and a car or plane when away), and buttons labeled “home” and “away” rather than “on” and “off”. Please point me to where I can learn more about how to customize the virtual switch. Many thanks!

@bmeyer29,

Have a look at this topic with perhaps this and this post.

Thanks for the quick response! I’ve now scanned the threads you reference, and it looks like what I need for the icons.

Any thoughts on changing the labels on the buttons from on/off to home/away? I assume it is pretty simple, it must just be buried in there somewhere.

Update: I found the appropriate references to the button labels in the json files and have changed the text from on/off to home/away. The json file also contains the text for the notification tab, so I changed the pull down to display “Are you Home or Away” and the two choices to “Home” and “Away”. I was hoping to be able to change the image displayed on the device box, depending the the state, with one image when the state is “home”, and another image when the state is “away”. However, it is not possible to point to different images for the two states. Instead, one image is for the default icon (say image.png), and the image for the 0 state is assumed to be image_0.png and the image for the 1 state is assumed to be image_100.png. This will require a push of images into the default directory (or a reference to an external website). A tool such as winscp can be used to push files into Vera, but I was hoping to make this an easier process for those uncomfortable with that kind of effort.

Thanks to oTi@ for pointing me in the right direction.