Examples of decreaseBrightness()


Examples of org.openhab.binding.hue.internal.hardware.HueBulb.decreaseBrightness()

        || deviceConfig.getType().equals(BindingType.rgb)) {
      if (IncreaseDecreaseType.INCREASE.equals(command)) {
        int resultingValue = bulb.increaseBrightness(deviceConfig.getStepSize());
        eventPublisher.postUpdate(itemName, new PercentType(resultingValue));
      } else if (IncreaseDecreaseType.DECREASE.equals(command)) {
        int resultingValue = bulb.decreaseBrightness(deviceConfig.getStepSize());
        eventPublisher.postUpdate(itemName, new PercentType(resultingValue));
      } else if ((command instanceof PercentType) && !(command instanceof HSBType)) {
        bulb.setBrightness((int)Math.round((double)255 / (double)100 * ((PercentType) command).intValue()));
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.