# MQTT Switch State: Command '1' not supported by type 'OnOffValue'

**URL:** <https://community.openhab.org/t/mqtt-switch-state-command-1-not-supported-by-type-onoffvalue/91398>\
**Category:** Bindings\
**Tags:** mqtt, mqtt-binding, mqtt2\
**Created:** [January 26, 2020, 6:30pm UTC](https://community.openhab.org/t/mqtt-switch-state-command-1-not-supported-by-type-onoffvalue/91398 "2020-01-26T18:30:45Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [May 1, 2020, 2:48pm UTC](https://community.openhab.org/t/mqtt-switch-state-command-1-not-supported-by-type-onoffvalue/91398/18 "2020-05-01T14:48:14Z")

</div>

> [@DonStefano](#):
>
> However, the warning still shows, if a code is received which is not covered by the two switch states.

You’d be interested in REGEX with JSONPATH

(REGEX is an installable add-on as well)

> [@MQTT 2.5 M1+ How to implement the equivalent to MQTT1 REGEX filters](https://community.openhab.org/t/mqtt-2-5-m1-how-to-implement-the-equivalent-to-mqtt1-regex-filters/68350):
>
> Problem In the MQTT1 binding there was a feature that let us filter messages published to a given topic and only pass those that match a given REGEX to the transformation and/or on to the Item. This was useful to handle devices that publish messages to a single well known topic for all their devices. For example, the official firmware from the vendor of Shelly devices have a request/response protocol over MQTT to get meta data about the devices (IP address, MAC address, firmware version, whethe…

> [@DonStefano](#):
>
> but I did not find yet a way to use system channel types with MQTT binding.

not sure if you mean channel `trigger` option?

---

_[View the full topic](https://community.openhab.org/t/mqtt-switch-state-command-1-not-supported-by-type-onoffvalue/91398)._
