On snapshot #1655 (same day as M2 came through)
Trying to increase the brightness of a color item:
Color CanvasKitchenColor { channel = "nanoleaf:controller:9F276836E179:color" }
This works fine: (keeping the current state values)
case 38949: {
var HSBType currentState
currentState = CanvasKitchenColor.state as HSBType
var DecimalType new_H = currentState.hue
var PercentType new_S = currentState.saturation
var PercentType new_B = currentState.brightness
logInfo("File", "color test: hue = {} sat = {} bright = {}", new_H, new_S, new_B)
var HSBType newState = new HSBType(new_H, new_S, new_B)
logInfo("File", "color test: hue = {} sat = {} bright = {}", new_H, new_S, new_B)
CanvasKitchenColor.sendCommand(newState)
logInfo("CanvasTouch", "CanvasKitchenColor=" + CanvasKitchenColor.state)
}
log:
2019-08-12 22:35:35.715 [INFO ] [e.smarthome.model.script.CanvasTouch] - CanvasTouchGesture State=0
2019-08-12 22:35:35.715 [INFO ] [e.smarthome.model.script.CanvasTouch] - CanvasTouchId State=38949
2019-08-12 22:35:35.716 [INFO ] [e.smarthome.model.script.CanvasTouch] - PanelId=38949 gesture=0
2019-08-12 22:35:35.717 [INFO ] [.eclipse.smarthome.model.script.File] - color test: hue = 0 sat = 0 bright = 25
2019-08-12 22:35:35.718 [INFO ] [.eclipse.smarthome.model.script.File] - color test: hue = 0 sat = 0 bright = 25
2019-08-12 22:35:35.719 [INFO ] [e.smarthome.model.script.CanvasTouch] - CanvasKitchenColor=0,0,25
This crashes: (trying to increase the brightness)
case 38949: {
var HSBType currentState
currentState = CanvasKitchenColor.state as HSBType
var DecimalType new_H = currentState.hue
var PercentType new_S = currentState.saturation
var PercentType new_B = currentState.brightness + 10
logInfo("File", "color test: hue = {} sat = {} bright = {}", new_H, new_S, new_B)
var HSBType newState = new HSBType(new_H, new_S, new_B)
logInfo("File", "color test: hue = {} sat = {} bright = {}", new_H, new_S, new_B)
CanvasKitchenColor.sendCommand(newState)
logInfo("CanvasTouch", "CanvasKitchenColor=" + CanvasKitchenColor.state)
}
log:
2019-08-12 22:46:50.753 [INFO ] [e.smarthome.model.script.CanvasTouch] - CanvasTouchGesture State=0
2019-08-12 22:46:50.753 [INFO ] [e.smarthome.model.script.CanvasTouch] - CanvasTouchId State=38949
2019-08-12 22:46:50.754 [INFO ] [e.smarthome.model.script.CanvasTouch] - PanelId=38949 gesture=0
2019-08-12 22:46:50.755 [INFO ] [.eclipse.smarthome.model.script.File] - color test: hue = 0 sat = 0 bright = 35
2019-08-12 22:46:50.755 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Nanoleaf touch': An error occurred during the script execution: Could not invoke constructor: org.eclipse.smarthome.core.library.types.HSBType.HSBType(org.eclipse.smarthome.core.library.types.DecimalType,org.eclipse.smarthome.core.library.types.PercentType,org.eclipse.smarthome.core.library.types.PercentType)
Only difference is the ‘+ 10’. Tried + new PersentType(10), same error.
I’m stumped …