diff --git a/org.openhab.binding.zigbee/ESH-INF/thing/osram/osram-switch-4x-eu.xml b/org.openhab.binding.zigbee/ESH-INF/thing/osram/osram-switch-4x-eu.xml new file mode 100644 index 000000000..dc2394e77 --- /dev/null +++ b/org.openhab.binding.zigbee/ESH-INF/thing/osram/osram-switch-4x-eu.xml @@ -0,0 +1,106 @@ + + + + + + + + The button in the bottom right corner (LED pointing down wards). + + 1 + 0x0006 + 0x01 + 0x0008 + 0x05 + + + + + This channel gets an event when a long press on the bottom right button is released. + + 1 + 0x0008 + 0x03 + + + + + The button in the bottom left corner (LED pointing down wards). + + 2 + + + + 0x0300 + 0x03 + + + + + This channel gets an event when a long press on the bottom left button is released. + + 2 + 0x0300 + 0x01 + moveMode + 0 + + + + + The button in the top right corner (LED pointing down wards). + + 3 + 0x0006 + 0x00 + 0x0008 + 0x01 + + + + + This channel gets an event when a long press on the top right button is released. + + 3 + 0x0008 + 0x03 + + + + + The button in the top left corner (LED pointing down wards). + + 4 + + + + 0x0300 + 0x03 + + + + + This channel gets an event when a long press on the top left button is released. + + 4 + 0x0300 + 0x01 + moveMode + 0 + + + + + 2 + + + + + + + + + + diff --git a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/converter/ZigBeeConverterGenericButton.java b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/converter/ZigBeeConverterGenericButton.java index 26e04a226..c9bcc9e0f 100644 --- a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/converter/ZigBeeConverterGenericButton.java +++ b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/converter/ZigBeeConverterGenericButton.java @@ -237,10 +237,8 @@ public CommandSpec(int clusterId, int commandId, String commandParameterName, St public boolean matchesCommand(ZclCommand command) { boolean commandIdMatches = command.getCommandId().intValue() == commandId; - boolean commandParameterMatches = commandParameterName == null || commandParameterValue == null - || matchesParameter(command); - - return commandIdMatches && commandParameterMatches; + return commandIdMatches + && (commandParameterName == null || commandParameterValue == null || matchesParameter(command)); } private boolean matchesParameter(ZclCommand command) { diff --git a/org.openhab.binding.zigbee/src/main/resources/discovery.txt b/org.openhab.binding.zigbee/src/main/resources/discovery.txt index f57297661..f8fda708c 100644 --- a/org.openhab.binding.zigbee/src/main/resources/discovery.txt +++ b/org.openhab.binding.zigbee/src/main/resources/discovery.txt @@ -6,3 +6,4 @@ bitron-video-av2010-34,vendor=Bitron Video,modelId=AV2010/34 xiaomi_lumisensorht,modelId=lumi.sensor_ht xiaomi_lumisensor-motion,modelId=lumi.sensor_motion innr-rc-110,vendor=innr,modelId=RC 110 +osram-switch-4x-eu,vendor=OSRAM,modelId=Switch 4x EU-LIGHTIFY