# Multitype channel

**URL:** <https://community.openhab.org/t/multitype-channel/14694>\
**Category:** Bindings\
**Tags:** configuration, development, binding\
**Created:** [October 1, 2016, 8:32pm UTC](https://community.openhab.org/t/multitype-channel/14694 "2016-10-01T20:32:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim06ka](https://community.openhab.org/user_avatar/community.openhab.org/tim06ka/32/30382_2.png) [@tim06ka](https://community.openhab.org/u/tim06ka)\
**Post date:** [October 1, 2016, 8:32pm UTC](https://community.openhab.org/t/multitype-channel/14694/1 "2016-10-01T20:32:52Z")

</div>

Hi! I’ve been trying to write binding for multichannel device. Each channel can be a switch or dimmer or … - depending on the configuration.  
Tell me please best practices and examples how to implement this kind of thing?

---

<div class="post-metadata">

**Author:** ![chris](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://community.openhab.org/u/chris)\
**Post date:** [October 1, 2016, 11:08pm UTC](https://community.openhab.org/t/multitype-channel/14694/2 "2016-10-01T23:08:48Z")

</div>

If the device is a switch/dimmer, then you should simply use the dimmer as the channel type. A dimmer inherits from a switch, so the dimmer can handle ON/OFF states as well as dimmer level states.

If you’re looking for something more generic, then it’s more difficult since the binding doesn’t know the item type (ie the binding has no visibility - currently - of the item).

---

<div class="post-metadata">

**Author:** ![Kai](https://community.openhab.org/user_avatar/community.openhab.org/kai/32/116281_2.png) [@Kai](https://community.openhab.org/u/Kai)\
**Post date:** [October 4, 2016, 7:21am UTC](https://community.openhab.org/t/multitype-channel/14694/3 "2016-10-04T07:21:58Z")

</div>

@tim06ka, I would advice to discuss thus development/API related questions directly at [Git content has moved.](https://www.eclipse.org/forums/index.php/f/271/).

---

<div class="post-metadata">

**Author:** ![tim06ka](https://community.openhab.org/user_avatar/community.openhab.org/tim06ka/32/30382_2.png) [@tim06ka](https://community.openhab.org/u/tim06ka)\
**Post date:** [October 4, 2016, 7:31am UTC](https://community.openhab.org/t/multitype-channel/14694/4 "2016-10-04T07:31:58Z")

</div>

Yes, my case is more generic - every channel can be input or output. I would like to be able to change the channel type in openhab UI, not in source code (xml).

---

<div class="post-metadata">

**Author:** ![tim06ka](https://community.openhab.org/user_avatar/community.openhab.org/tim06ka/32/30382_2.png) [@tim06ka](https://community.openhab.org/u/tim06ka)\
**Post date:** [October 4, 2016, 7:32am UTC](https://community.openhab.org/t/multitype-channel/14694/5 "2016-10-04T07:32:49Z")

</div>

Thanks, I’ll try
