use of org.eclipse.smarthome.binding.lifx.internal.fields.HSBK in project smarthome by eclipse.
the class LifxLightHandler method handleIncreaseDecreaseCommand.
private void handleIncreaseDecreaseCommand(IncreaseDecreaseType increaseDecrease) {
HSBK baseColor = getLightStateForCommand().getNullSafeColor();
PercentType newBrightness = increaseDecreasePercentType(increaseDecrease, baseColor.getHSB().getBrightness());
handlePercentCommand(newBrightness);
}
use of org.eclipse.smarthome.binding.lifx.internal.fields.HSBK in project smarthome by eclipse.
the class LifxLightHandler method handleTemperatureCommand.
private void handleTemperatureCommand(PercentType temperature) {
HSBK newColor = getLightStateForCommand().getNullSafeColor();
newColor.setSaturation(PercentType.ZERO);
newColor.setTemperature(temperature);
getLightStateForCommand().setColor(newColor);
}
use of org.eclipse.smarthome.binding.lifx.internal.fields.HSBK in project smarthome by eclipse.
the class LifxLightState method setBrightness.
public void setBrightness(PercentType brightness) {
HSBK[] newColors = getNullSafeColors();
for (HSBK newColor : newColors) {
newColor.setBrightness(brightness);
}
setColors(newColors);
}
use of org.eclipse.smarthome.binding.lifx.internal.fields.HSBK in project smarthome by eclipse.
the class LifxLightState method setTemperature.
public void setTemperature(PercentType temperature, int zoneIndex) {
HSBK newColor = getNullSafeColor(zoneIndex);
newColor.setTemperature(temperature);
setColor(newColor, zoneIndex);
}
use of org.eclipse.smarthome.binding.lifx.internal.fields.HSBK in project smarthome by eclipse.
the class LifxLightState method setColor.
public void setColor(HSBType newHSB) {
HSBK newColor = getNullSafeColor();
newColor.setHSB(newHSB);
setColor(newColor);
}
Aggregations