} else if (channelState.equals(UpDownType.DOWN)) {
command.append(DOWN_BYTE);
} else if (channelState instanceof PercentType){
// calculate dimmer value...
PercentType currentState = (PercentType) channelState;
int value = BigDecimal.valueOf(255).multiply(currentState.toBigDecimal()).divide(BigDecimal.valueOf(100), 0,
BigDecimal.ROUND_UP).intValue();
command.append(StringUtils.leftPad(Integer.toHexString(value), 2, "0").toUpperCase());
} else {
command.append(HIGH_BYTE);
}