Setting up Xiaomi Mi SmartPlug (Zigbee) with OpenHAB 3

You can simplify this a bit. You can get rid of your two JS transformations in your Switch Channels by simply adding

on="1",
off="0"

to your Switch Channel configuration where relevant, and

on="true",
off="false"

where relevant. Just remember to remove the JS transformation, but add in a JSONPATH transformation if required.

You can double check the available options for each Channel Type in the documentation.

1 Like