use of org.openhab.binding.lightwaverf.internal.command.LightwaveRfDimCommand in project openhab1-addons by openhab.
the class LightwaverfConvertorTest method testConvertFromLightwaveRfMessageDimCommand.
@Test
public void testConvertFromLightwaveRfMessageDimCommand() throws Exception {
LightwaverfConvertor convertor = new LightwaverfConvertor();
LightwaveRFCommand command = convertor.convertFromLightwaveRfMessage("010,!R2D3FdP24");
LightwaveRFCommand expected = new LightwaveRfDimCommand(10, "2", "3", 75);
assertEquals(expected, command);
}
use of org.openhab.binding.lightwaverf.internal.command.LightwaveRfDimCommand in project openhab1-addons by openhab.
the class LightwaverfConvertorTest method testConvertToLightwaveRfMessageDimCommand.
@Test
public void testConvertToLightwaveRfMessageDimCommand() throws Exception {
LightwaverfConvertor convertor = new LightwaverfConvertor();
LightwaveRFCommand command = convertor.convertToLightwaveRfMessage("2", "3", LightwaveRfType.DIMMER, new PercentType(75));
LightwaveRFCommand expected = new LightwaveRfDimCommand("200,!R2D3FdP24");
assertEquals(expected.getLightwaveRfCommandString(), command.getLightwaveRfCommandString());
}
Aggregations