# Switch with multi mappings

**URL:** <https://community.openhab.org/t/switch-with-multi-mappings/18384>\
**Category:** HABPanel\
**Created:** [December 17, 2016, 10:47pm UTC](https://community.openhab.org/t/switch-with-multi-mappings/18384 "2016-12-17T22:47:11Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Signal11](https://community.openhab.org/letter_avatar_proxy/v4/letter/s/4da419/32.png) [@Signal11](https://community.openhab.org/u/Signal11)\
**Post date:** [January 4, 2017, 9:11pm UTC](https://community.openhab.org/t/switch-with-multi-mappings/18384/6 "2017-01-04T21:11:10Z")

</div>

That example is based on my system. You will have to change it to use the name of an item in your item.

I have an item called “Back\_Porch\_Light”, that is a WeMO switch used to control a light. If you do not have an item called “Back\_Porch\_Light”, that code will never display anything. (The itemValue() function will return NULL if the specified item does not exist.)

For more information, and examples, check the template widget thread [here](https://community.openhab.org/t/template-widget-tutorial-examples-make-your-own-widget/14211).

---

_[View the full topic](https://community.openhab.org/t/switch-with-multi-mappings/18384)._
