use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInDimmerProfileTest method dimmLightDuringLongButtonPressDown.
@Test
public void dimmLightDuringLongButtonPressDown() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), Parameter.I);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
waitFor(10);
assertEquals("Update State", IncreaseDecreaseType.DECREASE, publisher.popLastCommand());
waitFor(300);
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 RockerSwitchInDimmerProfileTest method setUpDefaultDevice.
@Before
public void setUpDefaultDevice() {
parameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID));
provider.setParameterAddress(parameterAddress);
provider.setItem(new DimmerItem("dummie"));
provider.setEep(EEPId.EEP_F6_02_01);
binding.addBindingProvider(provider);
}
use of org.opencean.core.address.EnoceanParameterAddress in project openhab1-addons by openhab.
the class RockerSwitchInDimmerProfileTest method decreaseLightOnShortButtonPressDown.
@Test
public void decreaseLightOnShortButtonPressDown() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), Parameter.I);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
waitFor(10);
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 RockerSwitchInDimmerSteppingProfileTest method dimmLightDuringLongButtonPressUp.
@Test
public void dimmLightDuringLongButtonPressUp() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), CHANNEL, Parameter.O);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
waitFor(10);
assertEquals("Update State", IncreaseDecreaseType.DECREASE, publisher.popLastCommand());
waitFor(300);
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 RockerSwitchInDimmerSteppingProfileTest method lightenUpDuringVeryLongButtonPressDown.
@Test
public void lightenUpDuringVeryLongButtonPressDown() {
EnoceanParameterAddress valueParameterAddress = new EnoceanParameterAddress(EnoceanId.fromString(EnoceanBindingProviderMock.DEVICE_ID), CHANNEL, Parameter.I);
binding.valueChanged(valueParameterAddress, ButtonState.PRESSED);
waitFor(10);
assertEquals("Update State", IncreaseDecreaseType.INCREASE, publisher.popLastCommand());
waitFor(300);
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