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, int zoneIndex) {
HSBK newColor = getNullSafeColor(zoneIndex);
newColor.setBrightness(brightness);
setColor(newColor, zoneIndex);
}
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) {
HSBK[] newColors = getNullSafeColors();
for (HSBK newColor : newColors) {
newColor.setTemperature(temperature);
}
setColors(newColors);
}
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, int zoneIndex) {
HSBK newColor = getNullSafeColor(zoneIndex);
newColor.setHSB(newHSB);
setColor(newColor, zoneIndex);
}
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, int zoneIndex) {
HSBK newColor = getLightStateForCommand().getNullSafeColor(zoneIndex);
newColor.setSaturation(PercentType.ZERO);
newColor.setTemperature(temperature);
getLightStateForCommand().setColor(newColor, zoneIndex);
}
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, int zoneIndex) {
HSBK baseColor = getLightStateForCommand().getNullSafeColor(zoneIndex);
PercentType newBrightness = increaseDecreasePercentType(increaseDecrease, baseColor.getHSB().getBrightness());
handlePercentCommand(newBrightness, zoneIndex);
}
Aggregations