String rfAddress = device.getRFAddress();
String commandString = null;
if (command instanceof DecimalType || command instanceof OnOffType) {
DecimalType decimalType = DEFAULT_OFF_TEMPERATURE;
if (command instanceof DecimalType) {
decimalType = (DecimalType) command;
} else if (command instanceof OnOffType) {
decimalType = OnOffType.ON.equals(command) ? DEFAULT_ON_TEMPERATURE : DEFAULT_OFF_TEMPERATURE;
}
S_Command cmd = new S_Command(rfAddress, device.getRoomId(), decimalType.doubleValue());
commandString = cmd.getCommandString();
} else if (command instanceof StringType) {
String commandContent = command.toString().trim().toUpperCase();
ThermostatModeType commandThermoType = null;
if (commandContent.contentEquals(ThermostatModeType.AUTOMATIC.toString())) {