use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInDimmerOnOffProfileTest method dimmLightDuringLongButtonPressUp.
@Test
public void dimmLightDuringLongButtonPressUp() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), CHANNEL, Parameter.O);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
waitFor(400);
assertEquals("Update State", IncreaseDecreaseType.DECREASE, publisher.popLastCommand());
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
waitFor(10);
assertNull("Update State", publisher.popLastCommand());
}
use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInDimmerOnOffProfileTest method switchOffLightOnShortButtonPressUp.
@Test
public void switchOffLightOnShortButtonPressUp() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), CHANNEL, Parameter.O);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
waitFor(10);
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
waitFor(10);
assertEquals("Update State", OnOffType.OFF, publisher.popLastCommand());
}
use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInDimmerOnOffProfileTest method lightenUpDuringLongButtonPressDown.
@Test
public void lightenUpDuringLongButtonPressDown() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), CHANNEL, Parameter.I);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
waitFor(400);
assertEquals("Update State", IncreaseDecreaseType.INCREASE, publisher.popLastCommand());
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
waitFor(10);
assertNull("Update State", publisher.popLastCommand());
}
use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInDimmerOnOffProfileTest method switchOnLightOnShortButtonPressDown.
@Test
public void switchOnLightOnShortButtonPressDown() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), CHANNEL, Parameter.I);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
waitFor(10);
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
waitFor(10);
assertEquals("Update State", OnOffType.ON, publisher.popLastCommand());
}
use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInDimmerProfileTest method lightenUpDuringLongButtonPressUp.
@Test
public void lightenUpDuringLongButtonPressUp() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), Parameter.O);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
waitFor(10);
assertEquals("Update State", IncreaseDecreaseType.INCREASE, publisher.popLastCommand());
waitFor(300);
assertEquals("Update State", IncreaseDecreaseType.INCREASE, publisher.popLastCommand());
binding.valueChanged(valueParameterAddress, ButtonState.RELEASED);
waitFor(10);
assertNull("Update State", publisher.popLastCommand());
}
Aggregations